fix: add_cursor_next_match should move current cursor if there is no selection
This commit is contained in:
parent
185e081c7c
commit
cbab1f2fd9
1 changed files with 2 additions and 1 deletions
|
|
@ -3535,6 +3535,7 @@ pub const Editor = struct {
|
||||||
self.with_cursors_const_once(root, move_cursor_word_begin) catch {};
|
self.with_cursors_const_once(root, move_cursor_word_begin) catch {};
|
||||||
try self.with_selections_const_once(root, move_cursor_word_end);
|
try self.with_selections_const_once(root, move_cursor_word_end);
|
||||||
} else if (self.get_next_match(self.get_primary().cursor)) |match| {
|
} else if (self.get_next_match(self.get_primary().cursor)) |match| {
|
||||||
|
if (self.get_primary().selection) |_|
|
||||||
try self.push_cursor();
|
try self.push_cursor();
|
||||||
const primary = self.get_primary();
|
const primary = self.get_primary();
|
||||||
const root = self.buf_root() catch return;
|
const root = self.buf_root() catch return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue