fix: extend the correct end of the selection in move_cursor_prev_word_start_extend
This commit is contained in:
parent
c65a4af30a
commit
f964296051
1 changed files with 1 additions and 2 deletions
|
|
@ -601,8 +601,7 @@ fn move_cursor_prev_word_start_extend(root: Buffer.Root, cursel: *CurSel, metric
|
||||||
var selection = cursel.selection;
|
var selection = cursel.selection;
|
||||||
// check if we already had a selection and extend it
|
// check if we already had a selection and extend it
|
||||||
defer if (selection) |*pre_sel| {
|
defer if (selection) |*pre_sel| {
|
||||||
pre_sel.normalize();
|
if (cursel.selection) |*sel| sel.begin = pre_sel.begin;
|
||||||
if (cursel.selection) |*sel| sel.end = pre_sel.end;
|
|
||||||
};
|
};
|
||||||
try move_cursor_prev_word_start(root, cursel, metrics);
|
try move_cursor_prev_word_start(root, cursel, metrics);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue