fix: auto_find should always clear last_match_text
This commit is contained in:
parent
f6d1f27337
commit
54c68df967
2 changed files with 4 additions and 7 deletions
|
|
@ -1951,12 +1951,9 @@ pub const Editor = struct {
|
||||||
self.match_done_token = self.match_token;
|
self.match_done_token = self.match_token;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clear_matches_if_type(self: *Self, match_type: Match.Type) bool {
|
pub fn clear_matches_if_type(self: *Self, match_type: Match.Type) void {
|
||||||
if (self.match_type == match_type) {
|
if (self.match_type == match_type)
|
||||||
self.clear_matches();
|
self.clear_matches();
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn sort_matches(self: *Self) void {
|
pub fn sort_matches(self: *Self) void {
|
||||||
|
|
|
||||||
|
|
@ -1445,7 +1445,7 @@ fn location_jump(from: tp.pid_ref, file_path: []const u8, cursor: location_histo
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clear_auto_find(self: *Self, editor: *ed.Editor) void {
|
fn clear_auto_find(self: *Self, editor: *ed.Editor) void {
|
||||||
if (editor.clear_matches_if_type(.auto_find))
|
editor.clear_matches_if_type(.auto_find);
|
||||||
self.store_last_match_text(null);
|
self.store_last_match_text(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue