diff --git a/src/config.zig b/src/config.zig index 7d75693..fb04be4 100644 --- a/src/config.zig +++ b/src/config.zig @@ -30,6 +30,7 @@ modes_can_change_cursor: bool = true, enable_auto_save: bool = false, limit_auto_save_file_types: ?[]const []const u8 = null, // null means *all* enable_prefix_keyhints: bool = true, +enable_auto_find: bool = true, indent_size: usize = 4, tab_width: usize = 8, diff --git a/src/tui/mainview.zig b/src/tui/mainview.zig index 334389f..7a38573 100644 --- a/src/tui/mainview.zig +++ b/src/tui/mainview.zig @@ -1432,6 +1432,7 @@ pub fn handle_editor_event(self: *Self, _: tp.pid_ref, m: tp.message) tp.result 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; sel.normalize(); if (sel.end.row - sel.begin.row > ed.max_match_lines) return self.clear_auto_find(editor);