fix(open_file): restore match expression when returning to first completion
This commit is contained in:
parent
d4162e9f64
commit
062c989e6f
1 changed files with 5 additions and 1 deletions
|
@ -212,7 +212,11 @@ fn reverse_complete_file(self: *Self) !void {
|
|||
if (self.complete_trigger_count < 2) {
|
||||
self.complete_trigger_count = 0;
|
||||
self.file_path.clearRetainingCapacity();
|
||||
try self.file_path.appendSlice(self.query.items);
|
||||
if (self.match.items.len > 0) {
|
||||
try self.construct_path(self.query.items, .{ .name = self.match.items, .type = .file }, 0);
|
||||
} else {
|
||||
try self.file_path.appendSlice(self.query.items);
|
||||
}
|
||||
if (tui.current().mini_mode) |*mini_mode| {
|
||||
mini_mode.text = self.file_path.items;
|
||||
mini_mode.cursor = self.file_path.items.len;
|
||||
|
|
Loading…
Add table
Reference in a new issue