From 25149ccb9c791b41d8b2229fd12a80f718404239 Mon Sep 17 00:00:00 2001 From: Daniel Bowring Date: Wed, 30 Apr 2025 01:06:04 +1000 Subject: [PATCH] Fix column calculation to match status line --- helix-term/src/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 686af458b..86d586274 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -3847,7 +3847,7 @@ fn goto_column_impl(cx: &mut Context, movement: Movement) { let line = range.cursor_line(text); let line_start = text.line_to_char(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) }); doc.set_selection(view.id, selection);