refactor: make delete_word_left less greedy at beginning of line
This commit is contained in:
parent
7dab15da20
commit
da942fe640
1 changed files with 4 additions and 0 deletions
|
|
@ -3427,6 +3427,10 @@ pub const Editor = struct {
|
|||
}
|
||||
|
||||
fn move_cursor_word_left_space(root: Buffer.Root, cursor: *Cursor, metrics: Buffer.Metrics) error{Stop}!void {
|
||||
if (is_eol_left(root, cursor, metrics)) {
|
||||
try move_cursor_left(root, cursor, metrics);
|
||||
return;
|
||||
}
|
||||
try move_cursor_left(root, cursor, metrics);
|
||||
var next = cursor.*;
|
||||
next.move_left(root, metrics) catch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue