fix: incorrect match_type when highlight_references finds only one reference
This commit is contained in:
parent
cb189e3936
commit
bf8b2d6bcd
1 changed files with 1 additions and 1 deletions
|
|
@ -6264,11 +6264,11 @@ pub const Editor = struct {
|
||||||
pub const highlight_references_meta: Meta = .{ .description = "Language: Highlight references" };
|
pub const highlight_references_meta: Meta = .{ .description = "Language: Highlight references" };
|
||||||
|
|
||||||
pub fn add_highlight_reference(self: *Self, match_: Match) void {
|
pub fn add_highlight_reference(self: *Self, match_: Match) void {
|
||||||
self.match_type = .highlight_references;
|
|
||||||
if (self.highlight_references_state == .done) {
|
if (self.highlight_references_state == .done) {
|
||||||
self.highlight_references_state = .adding;
|
self.highlight_references_state = .adding;
|
||||||
self.cancel_all_matches();
|
self.cancel_all_matches();
|
||||||
}
|
}
|
||||||
|
self.match_type = .highlight_references;
|
||||||
const root = self.buf_root() catch return;
|
const root = self.buf_root() catch return;
|
||||||
var match = match_;
|
var match = match_;
|
||||||
match.begin.row -|= 1;
|
match.begin.row -|= 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue