From 68a74ec034a24c9b016497880e375f291498ae5f Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 10:49:56 -0300 Subject: A terminal's new directory is a rename in the log, and its ctl counts its body The log said new N / and later del N for a terminal, with no rename in between, though a terminal is named by its directory. setCwd now logs the rename once the pane has been announced. A terminal's ctl line gave body length 0 while its body reads its history; it now counts that history (without keeping a copy). Co-Authored-By: Claude Opus 5.5 --- src/pardes.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index 405e7839..084b2216 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4298,6 +4298,9 @@ pub const Pardes = struct { if (std.mem.eql(u8, cur, cwd)) return; pane.setOwnedCwd(cwd) catch |err| return p.reportError(id, "directory", err); if (look.lookHoverPane(p) == id) look.cancelLookHover(p); + // A terminal is named by its directory, so /log hears it renamed; one + // not announced yet is announced under the new name. + if (pane.isTerminal() and !pane.fs.unannounced) ctlfs.events.noteLog(p, .rename, pane); } pub fn shellBin(p: *const Pardes) []const u8 { -- cgit v1.3