diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pardes.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 7e426ba4..59e8670f 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4850,7 +4850,10 @@ pub const Pardes = struct { const src = p.panes[from_id] orelse return error.MissingPane; const content = try p.gpa.dupe(u8, ""); errdefer p.gpa.free(content); - const np = try panes.Output.open(p, free, paneDir(src), .{ .cmd = .New }, "", 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. + const dir = paneDir(src); + const np = try panes.Output.open(p, free, if (dir.len == 0) p.sessionDir() else dir, .{ .cmd = .New }, "", content); np.cwd = .{ .inherited = src }; np.body.cur_pinned = true; return np; |
