fix: don't re-run highlight_references if it is current

This commit is contained in:
CJ van den Berg 2026-01-14 13:44:12 +01:00
parent bf8b2d6bcd
commit 12c4d507b4
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -6954,7 +6954,9 @@ pub const EditorWidget = struct {
switch (self.editor.match_type) { switch (self.editor.match_type) {
.find, .auto_find => return, .find, .auto_find => return,
.highlight_references => { .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(); self.editor.cancel_all_matches();
tui.need_render(); tui.need_render();
} }