summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 739d5bf2..52d11bec 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -4852,11 +4852,13 @@ pub const Pardes = struct {
errdefer p.gpa.free(content);
// A terminal that has not said where it is yet (the boot layout's)
// has no directory: the scratch is the session's, <cwd>/+New. So is
- // 9P's pane/new: no pane asked for it, whichever last had the
- // keyboard (acme's new window has acme's directory).
- const dir = if (kind == .fs) "" else paneDir(src);
+ // 9P's pane/new, and a New from a column's or the workspace's tag:
+ // no pane asked for it, whichever last had the keyboard (acme's new
+ // window has acme's directory).
+ const own = kind != .fs and !p.exec_header;
+ const dir = if (own) paneDir(src) else "";
const np = try panes.Output.open(p, free, if (dir.len == 0) p.sessionDir() else dir, .{ .cmd = .New }, "", content);
- if (kind != .fs) np.cwd = .{ .inherited = src };
+ if (own) np.cwd = .{ .inherited = src };
np.body.cur_pinned = true;
return np;
}