summaryrefslogtreecommitdiff
path: root/src/ninep/ctl.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 10:49:56 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit68a74ec034a24c9b016497880e375f291498ae5f (patch)
tree968a3eeec731d3ea632ab98f872074863ec6183b /src/ninep/ctl.zig
parent73e797e3f31eb52b0074b86cd16949c827b75670 (diff)
downloadpardes-68a74ec034a24c9b016497880e375f291498ae5f.tar.gz
pardes-68a74ec034a24c9b016497880e375f291498ae5f.zip
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 <cwd> 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 <[email protected]>
Diffstat (limited to 'src/ninep/ctl.zig')
-rw-r--r--src/ninep/ctl.zig3
1 files changed, 2 insertions, 1 deletions
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,