From 3ff32507f7dbd28cb9bb67e29b03051cbf5d5f18 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 11 Nov 2025 14:22:42 +0100 Subject: [PATCH] fix: scan_next_match in .inclusive selection mode --- src/tui/editor.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 5a86c5c..89f5dd7 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -5394,7 +5394,10 @@ pub const Editor = struct { const multi_cursor = self.cursels.items.len > 1; for (self.matches.items) |*match_| if (match_.*) |*match| { if (match.has_selection) continue; - if (cursor.within(match.to_selection())) return match; + 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; };