From c78641fdbe931ca2e6e87eb3e001bd021c1eba3f Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 06:16:52 -0300 Subject: A pty/ctl winsize gives a terminal two rows at least, so it no longer reads busy for ever A one-row pty loses the prompt's input mark as soon as the prompt wraps, and busy detection never sees the shell idle again. Placement already keeps a new terminal at tag + 2 rows; a winsize write now keeps the pty at two. A pane dragged down to one body row keeps a one-row pty, since a taller pty than the pane shows would put its cursor below the pane. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/fs.md b/docs/fs.md index 5c2486f4..9ba9c0e4 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -818,8 +818,9 @@ terminal (a REPL, `less`) takes none: write to `pty/data` for it -- which is also when the third field of `pty/status` reads 1. `pty/status` is one line, three right-aligned fields and a newline: the pty's columns and rows, then busy (0 or 1). The size, and `pty/ctl`'s `winsize` read back, is -what `winsize C R` last set, until the pane itself resizes and gives the pty -its grid again. A line written +what `winsize C R` last set (R of 1 is taken as 2: a one-row pty loses +its prompt's mark and would read busy for ever), until the pane itself +resizes and gives the pty its grid again. A line written before a new terminal's shell has drawn its first prompt is not busy: it waits for that prompt (a respawn meanwhile keeps it waiting for the new shell's) and is sent then, so the first command a script gives a fresh -- cgit v1.3