refactor: add editor.have_matches function

This commit is contained in:
CJ van den Berg 2025-11-10 10:59:20 +01:00
parent f909e1437e
commit 7ad00a6f76
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -1912,6 +1912,10 @@ pub const Editor = struct {
self.matches.clearAndFree(self.allocator); 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 { pub fn clear_matches(self: *Self) void {
self.cancel_all_matches(); self.cancel_all_matches();
self.match_token += 1; self.match_token += 1;