mirror of https://github.com/helix-editor/helix
Fix column calculation to match status line
parent
0263b7e1f1
commit
25149ccb9c
|
@ -3847,7 +3847,7 @@ fn goto_column_impl(cx: &mut Context, movement: Movement) {
|
||||||
let line = range.cursor_line(text);
|
let line = range.cursor_line(text);
|
||||||
let line_start = text.line_to_char(line);
|
let line_start = text.line_to_char(line);
|
||||||
let line_end = line_end_char_index(&text, line);
|
let line_end = line_end_char_index(&text, line);
|
||||||
let pos = graphemes::prev_grapheme_boundary(text, line_start + count).min(line_end);
|
let pos = graphemes::nth_next_grapheme_boundary(text, line_start, count - 1).min(line_end);
|
||||||
range.put_cursor(text, pos, movement == Movement::Extend)
|
range.put_cursor(text, pos, movement == Movement::Extend)
|
||||||
});
|
});
|
||||||
doc.set_selection(view.id, selection);
|
doc.set_selection(view.id, selection);
|
||||||
|
|
Loading…
Reference in New Issue