From c1707b132eb3781c9ea85299bf1ebe99b4db9d84 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 26 Nov 2025 12:52:23 +0100 Subject: [PATCH] fix: smart select next find mode if find mode is .auto --- src/tui/mode/mini/find.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tui/mode/mini/find.zig b/src/tui/mode/mini/find.zig index b5f05c4..a887b40 100644 --- a/src/tui/mode/mini/find.zig +++ b/src/tui/mode/mini/find.zig @@ -180,7 +180,11 @@ const cmds = struct { pub fn toggle_find_mode(self: *Self, _: Ctx) Result { const new_find_mode: Buffer.FindMode = switch (self.find_mode) { .exact => .case_folded, - .auto, .case_folded => .exact, + .case_folded => .exact, + .auto => if (Buffer.unicode.is_lowercase(self.input_.items)) + .exact + else + .case_folded, }; const allocator = self.allocator; const query = try allocator.dupe(u8, self.input_.items);