From 89ca00ddefe45a4196667cd5be3393a7b5d96c30 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 21 Jan 2026 20:25:48 +0100 Subject: [PATCH] fix: move_page_up and related functions should cancel the selection --- src/tui/editor.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 679b687..3501611 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -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 { 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 { someone_stopped = true; }; + }; self.collapse_cursors(); return if (someone_stopped) error.Stop else {}; }