fix: use correct direction for selection in move_cursor_prev_word_start

This commit is contained in:
CJ van den Berg 2025-11-27 20:19:36 +01:00
parent d410fabf1b
commit 0ca1d372f6
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -575,6 +575,7 @@ fn move_cursor_prev_word_start(root: Buffer.Root, cursel: *CurSel, metrics: Buff
cursor.move_left(root, metrics) catch {};
var sel = cursel.to_selection_inclusive(root, metrics);
sel.reverse();
defer {
sel.begin = cursor;
cursel.cursor = cursor;