From 0f16886d2f8f53b8d746341e3e2c9fc55f2446c2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 11:38:12 -0300 Subject: A list pane opened from a terminal that has not said its directory yet lands in the session's ThemeSel (Themes) in an init file ran at a terminal whose shell had not reported its cwd, so +Themes opened as /+Themes. Co-Authored-By: Claude Opus 5.5 --- src/exec.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/exec.zig') diff --git a/src/exec.zig b/src/exec.zig index 421bfd13..0e9fb6d7 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -831,6 +831,9 @@ test "an init file's ThemeSel runs as Themes and says it was renamed" { listed = listed or std.meta.eql(o.from, panes.Output.Origin{ .cmd = .Themes }); }; try std.testing.expect(listed); + // In the session's directory, not `/`. + for (p.panes) |slot| if (slot) |pane| if (pane.file) |f| if (f.output != null) + try std.testing.expectEqualStrings(p.sessionDir(), std.fs.path.dirname(f.path).?); var said = false; for (p.panes) |slot| if (slot) |pane| { said = said or std.mem.eql(u8, pane.msg[0..pane.msg_len], "ThemeSel: renamed to Themes"); -- cgit v1.3