@@ -25,8 +25,7 @@ pub fn move_horizontally(
26 Direction::Forward => {
26 Direction::Forward => {
27 // Line end is pos at the start of next line - 1
27 // Line end is pos at the start of next line - 1
28− // subtract another 1 because the line ends with \n
29− let end = text.line_to_char(line + 1).saturating_sub(2);
28+ let end = text.line_to_char(line + 1).saturating_sub(1);
30 nth_next_grapheme_boundary(text, pos, count).min(end)
29 nth_next_grapheme_boundary(text, pos, count).min(end)