fix: make sure we don't destroy file_path before navigating in open_file mini mode
This commit is contained in:
parent
622d65497a
commit
bcef17a466
1 changed files with 1 additions and 1 deletions
|
@ -37,9 +37,9 @@ pub fn select(self: *Type) void {
|
||||||
var buf = std.ArrayList(u8).init(self.allocator);
|
var buf = std.ArrayList(u8).init(self.allocator);
|
||||||
defer buf.deinit();
|
defer buf.deinit();
|
||||||
const file_path = project_manager.expand_home(&buf, self.file_path.items);
|
const file_path = project_manager.expand_home(&buf, self.file_path.items);
|
||||||
command.executeName("exit_mini_mode", .{}) catch {};
|
|
||||||
if (root.is_directory(file_path))
|
if (root.is_directory(file_path))
|
||||||
tp.self_pid().send(.{ "cmd", "change_project", .{file_path} }) catch {}
|
tp.self_pid().send(.{ "cmd", "change_project", .{file_path} }) catch {}
|
||||||
else if (file_path.len > 0)
|
else if (file_path.len > 0)
|
||||||
tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_path } }) catch {};
|
tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_path } }) catch {};
|
||||||
|
command.executeName("exit_mini_mode", .{}) catch {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue