From 12c4d507b4af68aa12020efa60dbaad2223099ef Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 14 Jan 2026 13:44:12 +0100 Subject: [PATCH] fix: don't re-run highlight_references if it is current --- src/tui/editor.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 1fde100..e8fe901 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -6954,7 +6954,9 @@ pub const EditorWidget = struct { switch (self.editor.match_type) { .find, .auto_find => return, .highlight_references => { - if (self.editor.match_at_cursor(primary.cursor) == null) { + if (self.editor.match_at_cursor(primary.cursor)) |_| { + return; + } else { self.editor.cancel_all_matches(); tui.need_render(); }