feat: open most recent file on project switch
This commit is contained in:
parent
53310cc2dd
commit
bd27db46d1
3 changed files with 27 additions and 0 deletions
|
@ -258,6 +258,10 @@ const cmds = struct {
|
|||
const project = tp.env.get().str("project");
|
||||
tui.current().rdr.set_terminal_working_directory(project);
|
||||
_ = try self.statusbar.msg(.{ "PRJ", "open" });
|
||||
if (try project_manager.request_most_recent_file(self.a)) |file_path| {
|
||||
defer self.a.free(file_path);
|
||||
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_path } });
|
||||
}
|
||||
}
|
||||
|
||||
pub fn navigate(self: *Self, ctx: Ctx) Result {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue