From 7ad00a6f768bbf7819d104b251ed189558a6b8c2 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 10 Nov 2025 10:59:20 +0100 Subject: [PATCH] refactor: add editor.have_matches function --- src/tui/editor.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 77a51ba..5308fba 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -1912,6 +1912,10 @@ pub const Editor = struct { self.matches.clearAndFree(self.allocator); } + pub fn have_matches(self: *Self) bool { + return self.matches.items.len > 0; + } + pub fn clear_matches(self: *Self) void { self.cancel_all_matches(); self.match_token += 1;