From f9642960515d29ef1e518100705cf70c16da3b54 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 27 Nov 2025 20:24:53 +0100 Subject: [PATCH] fix: extend the correct end of the selection in move_cursor_prev_word_start_extend --- src/tui/mode/helix.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tui/mode/helix.zig b/src/tui/mode/helix.zig index 5036864..69daf70 100644 --- a/src/tui/mode/helix.zig +++ b/src/tui/mode/helix.zig @@ -601,8 +601,7 @@ fn move_cursor_prev_word_start_extend(root: Buffer.Root, cursel: *CurSel, metric var selection = cursel.selection; // check if we already had a selection and extend it defer if (selection) |*pre_sel| { - pre_sel.normalize(); - if (cursel.selection) |*sel| sel.end = pre_sel.end; + if (cursel.selection) |*sel| sel.begin = pre_sel.begin; }; try move_cursor_prev_word_start(root, cursel, metrics); }