diff --git a/src/tui/mainview.zig b/src/tui/mainview.zig index 7c75fb8..50830a9 100644 --- a/src/tui/mainview.zig +++ b/src/tui/mainview.zig @@ -1496,8 +1496,8 @@ pub fn handle_editor_event(self: *Self, _: tp.pid_ref, m: tp.message) tp.result if (try m.match(.{ tp.any, tp.any, "none" })) return self.clear_auto_find(editor); if (try m.match(.{ tp.any, tp.any, tp.extract(&sel.begin.row), tp.extract(&sel.begin.col), tp.extract(&sel.end.row), tp.extract(&sel.end.col) })) { - if (editor.have_matches_not_of_type(.auto_find)) return; if (!tui.config().enable_auto_find) return; + if (editor.find_selection_match(sel)) |_| return; sel.normalize(); if (sel.end.row - sel.begin.row > ed.max_match_lines) return self.clear_auto_find(editor);