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/ninep/ctl.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ninep/ctl.zig') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 5fe04f5c..c1f78bab 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -156,7 +156,8 @@ pub fn paneText(p: *Pardes, pane: *Pane, buf: []u8) []const u8 { w.print("{d:>11} {d:>11} {d:>11} {d:>11} {d:>11} {d:>11} ", .{ pane.serial, pane_files.tagOf(p, pane).len, - pane_files.bodyOf(pane).len, + // A terminal's body is its history, read whole on an open's first read. + if (pane.isTerminal()) panes.Terminal.screenTextLen(pane) else pane_files.bodyOf(pane).len, @as(u32, 0), @intFromBool(pane_files.dirtyOf(pane)), pane.cols, -- cgit v1.3