feat: update terminal working directory on project change

This commit is contained in:
CJ van den Berg 2024-08-19 21:53:30 +02:00
parent 849ef606a7
commit 53310cc2dd
3 changed files with 10 additions and 2 deletions

View file

@ -233,6 +233,8 @@ const cmds = struct {
if (!try ctx.args.match(.{tp.extract(&project_dir)}))
return;
try project_manager.open(project_dir);
const project = tp.env.get().str("project");
tui.current().rdr.set_terminal_working_directory(project);
_ = try self.statusbar.msg(.{ "PRJ", "open" });
}
@ -253,6 +255,8 @@ const cmds = struct {
if (self.file_list_type == .diagnostics and self.is_panel_view_showing(filelist_view))
try self.toggle_panel_view(filelist_view, false);
try project_manager.open(project_dir);
const project = tp.env.get().str("project");
tui.current().rdr.set_terminal_working_directory(project);
_ = try self.statusbar.msg(.{ "PRJ", "open" });
}