@@ -1,11 +1,11 @@
11use helix_core::{
2− comment, coords_at_pos, find_first_non_whitespace_char, find_root, graphemes, indent,
3− match_brackets,
2+ comment, coords_at_pos, find_first_non_whitespace_char, find_root, get_line_ending, graphemes,
3+ indent, match_brackets,
44 movement::{self, Direction},
55 object, pos_at_coords,
66 regex::{self, Regex},
77 register::{self, Register, Registers},
8− search, selection, Change, ChangeSet, LineEnding, Position, Range, Rope, RopeSlice, Selection, get_line_ending,
8+ search, selection, Change, ChangeSet, LineEnding, Position, Range, Rope, RopeSlice, Selection,
99 SmallVec, Tendril, Transaction,
1010};
1111
@@ -183,9 +183,11 @@ pub fn move_line_end(cx: &mut Context) {
183183 let text = doc.text();
184184 let line = text.char_to_line(range.head);
185185
186− let pos = text
187− .line_to_char(line + 1)
188− .saturating_sub(get_line_ending(&text.line(line)).map(|le| le.len_chars()).unwrap_or(0));
186+ let pos = text.line_to_char(line + 1).saturating_sub(
187+ get_line_ending(&text.line(line))
188+ .map(|le| le.len_chars())
189+ .unwrap_or(0),
190+ );
189191
190192 Range::new(pos, pos)
191193 });
@@ -606,9 +608,11 @@ pub fn extend_line_end(cx: &mut Context) {
606608 let text = doc.text();
607609 let line = text.char_to_line(range.head);
608610
609− let pos = text
610− .line_to_char(line + 1)
611− .saturating_sub(get_line_ending(&text.line(line)).map(|le| le.len_chars()).unwrap_or(0));
611+ let pos = text.line_to_char(line + 1).saturating_sub(
612+ get_line_ending(&text.line(line))
613+ .map(|le| le.len_chars())
614+ .unwrap_or(0),
615+ );
612616
613617 Range::new(range.anchor, pos)
614618 });