aboutsummaryrefslogtreecommitdiffstats
path: root/src/app_draw.c
diff options
context:
space:
mode:
authorIngmar Steen <iksteen@gmail.com>2026-09-06 19:39:57 +0200
committerIngmar Steen <iksteen@gmail.com>2026-09-06 19:39:57 +0200
commitde3dacc0d23b6ca75fbe63370510f101c1e6a9e7 (patch)
treef624e1362d461dcb55e31ad15902ecf9981e32c0 /src/app_draw.c
parentpane: drop the render snapshot of panes on hidden tabs -- 154K -> 66K each (diff)
downloadslosh-de3dacc0d23b6ca75fbe63370510f101c1e6a9e7.tar.gz
slosh-de3dacc0d23b6ca75fbe63370510f101c1e6a9e7.tar.xz
slosh-de3dacc0d23b6ca75fbe63370510f101c1e6a9e7.zip
server: one synchronized message per frame, cells and images together
A frame went out as two messages: the cell diff, then the kitty placements that belong on top of it. The client wrote each to the terminal with its own write, and directly on a tty the two land in one read often enough that nobody saw the gap. Put anything that re-chunks the stream in between -- a mirror like shellglass, which reads the pty 8KB at a time and writes each read straight through -- and the gap becomes a screen refresh of its own: the cells where the picture is, repainted, with no picture on them, and the placement arriving a moment later to put it back. Every image on screen blinks once per frame, which is how it was reported: unstable, as if constantly redrawn. So the two halves travel as one message now, and the whole frame is wrapped in synchronized output (DEC private mode 2026), which a terminal buffers and presents as one update. That covers the case the single message cannot: a frame larger than one read downstream is still split, and the markers are what stop the halves being presented separately. Terminals that do not implement 2026 ignore the private mode, so it goes out unconditionally -- the same thing tmux does, and the reason a redraw under tmux never showed this. The live check asserts what the fix is: no image command reaches the client outside a synchronized update. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRz3zwZJvBvzsR9k4cj6dd
Diffstat (limited to 'src/app_draw.c')
0 files changed, 0 insertions, 0 deletions