1
0
Fork 0
forked from murx/murx

Resize session to the most recently attached client

Replace the smallest-client sizing rule: the newest attach or resize now
sets the session size, so reattaching from a larger terminal grows the
session even while an older, smaller client is still connected. Smaller
clients render only the top-left part that fits.

Add Ctrl-A R to force the session back to the current client's size, and
reap dead clients before drawing so a disconnect's size change lands in
the same frame.
This commit is contained in:
Armin 2026-11-08 20:34:17 +01:00
commit 7142ed7240
4 changed files with 60 additions and 25 deletions

View file

@ -60,7 +60,7 @@ The client now reconciles its size with `TIOCGWINSZ` every `SIZE_CHECK_MS`
(250 ms) instead of only reacting to `SIGWINCH`. Some terminals update the pty
size without delivering a signal, or deliver it before the new size is
visible; the periodic check corrects both. Keep the SIGWINCH self-pipe and flag
as the low-latency path. Note that the session is intentionally sized to the
smallest attached client, so a larger client still shows the session centred
with a border; use `Ctrl-A *` to check for extra attached clients when
diagnosing "it did not grow" reports.
as the low-latency path. The session size is set by the most recently attached
or resized client, so reattaching from a larger terminal grows the session even
if an older client is still connected; smaller clients show the top-left part.
Use `Ctrl-A *` to list attached clients when diagnosing size reports.