From d08c65818fa029c4d2342d45a12db617bbf4e77c Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 19 Nov 2025 19:14:02 +0100 Subject: [PATCH] fix: bug in scan_next_match causing add_cursor_next_match to fail --- src/tui/editor.zig | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 24f5023..9246de0 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -5451,14 +5451,12 @@ pub const Editor = struct { fn scan_next_match(self: *const Self, cursor: Cursor) ?*Match { const row = cursor.row; const col = cursor.col; - const multi_cursor = self.cursels.items.len > 1; for (self.matches.items) |*match_| if (match_.*) |*match| { if (match.has_selection) continue; switch (tui.get_selection_style()) { .normal => if (cursor.within(match.to_selection())) return match, .inclusive => {}, } - if (multi_cursor) continue; if (row < match.begin.row or (row == match.begin.row and col < match.begin.col)) return match; }; return null;