From ee2481094645b18bee650a25a5b16029eb1fe9c7 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 10 Nov 2025 12:14:22 +0100 Subject: [PATCH] fix: add_cursor_all_matches should move current cursor if there is no selection --- src/tui/editor.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 27b014c..354e860 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -3553,7 +3553,8 @@ pub const Editor = struct { if (self.matches.items.len == 0) return; try self.send_editor_jump_source(); while (self.get_next_match(self.get_primary().cursor)) |match| { - try self.push_cursor(); + if (self.get_primary().selection) |_| + try self.push_cursor(); const primary = self.get_primary(); const root = self.buf_root() catch return; primary.selection = match.to_selection();