fix: don't re-run highlight_references if it is current
This commit is contained in:
parent
bf8b2d6bcd
commit
12c4d507b4
1 changed files with 3 additions and 1 deletions
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue