summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 03:06:32 -0300
committerGabriel Schneider <[email protected]>2026-10-01 03:07:15 -0300
commitf4d6af40a89e65ec63b250bf76d1bd1021777dd8 (patch)
treee2f9db8b7c5fe77e4abc3b66d3fb637fb3a21ebd /test
parent422ad65025edd994b04728632fc96de4ebda07f7 (diff)
downloadpardes-f4d6af40a89e65ec63b250bf76d1bd1021777dd8.tar.gz
pardes-f4d6af40a89e65ec63b250bf76d1bd1021777dd8.zip
A detached session's pty is sized in pixels too, at the last frontend's cell size or a nominal 8x16 before one attached
forkShell sized a new pty in pixels (ptyWinsize), but the detached server's resize set xpixel and ypixel to 0, and a pane is resized as it is placed, so a program in a detached session with no frontend (yazi) saw a pty with no pixels and drew no images. CSI 14/16/18 t were already answered at the nominal 8x16 cell. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
-rw-r--r--test/fs.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/fs.py b/test/fs.py
index 789021bd..2507e4f8 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -479,6 +479,11 @@ def run_file(binary):
assert run(client, term, b'fi\n') == b'error not run\n' # a syntax error runs nothing
assert run(client, term, b"echo 'open\n") == b'error not run\n' # nor does an open quote
assert run(client, term, b'true\n') == b'exit 0\n' # ...and the shell is clear after
+ # With no frontend attached the pty's size is in pixels too, at a
+ # nominal 8x16 cell: a program sizes its kitty graphics by it.
+ said = run(client, term, b'python3 -c \'import fcntl,termios,struct;print(*struct.unpack("4H",fcntl.ioctl(0,termios.TIOCGWINSZ,bytes(8))))\'\n')
+ rows, cols, xpixel, ypixel = map(int, said.split(b'\n')[1].split())
+ assert (xpixel, ypixel) == (cols * 8, rows * 16) and xpixel > 0, said
# A paging command run through pty/run does not wait in less: the
# terminal's PAGER is `pardes -`, and its text is a +Pager pane.
if shutil.which('git'):