word left stops before newline when moved from other line
This commit is contained in:
parent
523f08c281
commit
2266c92eab
1 changed files with 5 additions and 0 deletions
|
|
@ -3672,6 +3672,11 @@ pub const Editor = struct {
|
|||
}
|
||||
|
||||
pub fn move_cursor_word_left(root: Buffer.Root, cursor: *Cursor, metrics: Buffer.Metrics) error{Stop}!void {
|
||||
if (cursor.col == 0) {
|
||||
cursor.move_up(root, metrics) catch return;
|
||||
cursor.move_end(root, metrics);
|
||||
return;
|
||||
}
|
||||
try move_cursor_left(root, cursor, metrics);
|
||||
move_cursor_left_until(root, cursor, is_word_boundary_left, metrics);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue