fix: move_page_up and related functions should cancel the selection
This commit is contained in:
parent
f24ecdaed3
commit
89ca00ddef
1 changed files with 3 additions and 1 deletions
|
|
@ -2108,10 +2108,12 @@ pub const Editor = struct {
|
||||||
|
|
||||||
fn with_cursors_and_view_const(self: *Self, root: Buffer.Root, move: cursor_view_operator_const, view: *const View) error{Stop}!void {
|
fn with_cursors_and_view_const(self: *Self, root: Buffer.Root, move: cursor_view_operator_const, view: *const View) error{Stop}!void {
|
||||||
var someone_stopped = false;
|
var someone_stopped = false;
|
||||||
for (self.cursels.items) |*cursel_| if (cursel_.*) |*cursel|
|
for (self.cursels.items) |*cursel_| if (cursel_.*) |*cursel| {
|
||||||
|
cursel.disable_selection(root, self.metrics);
|
||||||
with_cursor_and_view_const(root, move, cursel, view, self.metrics) catch {
|
with_cursor_and_view_const(root, move, cursel, view, self.metrics) catch {
|
||||||
someone_stopped = true;
|
someone_stopped = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
self.collapse_cursors();
|
self.collapse_cursors();
|
||||||
return if (someone_stopped) error.Stop else {};
|
return if (someone_stopped) error.Stop else {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue