diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 05:25:34 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 2ca2813207403ca8e9ffe75e8bb96945df2b1bd0 (patch) | |
| tree | 800d85c186bcbfae767091c89bdafe38b3ca0817 /src/pardes.zig | |
| parent | 637ab988f0922173055ea98b1f76916e42f4222a (diff) | |
| download | pardes-2ca2813207403ca8e9ffe75e8bb96945df2b1bd0.tar.gz pardes-2ca2813207403ca8e9ffe75e8bb96945df2b1bd0.zip | |
The boot scratch is <cwd>/+New, not /+New
At boot the scratch under the shell was made before the shell said where
it was, so its name was /+New. A scratch made from a pane with no
directory yet is now the session's, <cwd>/+New.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -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; |
