Adds an `equalize` layout action that redistributes split sizes so each
window receives a proportional share of space along each axis.
Also adds an `equalize_on_close` layout option that automatically
equalizes splits whenever a window is closed, keeping the remaining
windows balanced without requiring an explicit key binding.
These two features compose well. For example, to keep splits balanced
at all times - equalizing on every open and close:
enabled_layouts splits:equalize_on_close=true
map ctrl+' combine : launch --location=hsplit --cwd=current : layout_action equalize
map ctrl+/ combine : launch --location=vsplit --cwd=current : layout_action equalize
A standalone key binding for manual rebalancing is also supported:
map ctrl+shift+e layout_action equalize
Recognize CSI ? 5 W as DECST8C, which resets the active screen's tab
stops to the default of every 8 columns. Other CSI W variants continue
to produce a parse error.
Signed-off-by: Ayman Bagabas <aymanbagabas@gmail.com>
Previously, every window resize reinitialised the tab stops to the
default of every 8 columns, discarding any stops set via HTS or cleared
via TBC. ECMA-48 only treats RIS, DECSTR, and DECCOLM as events that
reset tab stops, and other terminal emulators all preserve user-set
stops across an interactive resize.
Copy the surviving prefix of the previous tab stops into the freshly
allocated array on both main and alt screens. Newly added columns when
growing the window keep the default every 8 columns pattern. Also point
the active tabstops pointer at the alt screen's array when a resize
happens while the alt screen is active, instead of unconditionally
resetting it to the main screen's array.
Signed-off-by: Ayman Bagabas <aymanbagabas@gmail.com>
We dont bother with configurable ttl. Instead treat the start of caching
as the instant when cache freshness is checked. And ensure that cache is
re-used for every OS Window.
Fixes#9862Fixes#9872
Always do a roundtrip at kitten exit, except for special purpose
kittens. This slows down exit by one round trip time (capped at 2
seconds), however it ensures that we never get terminal response leak.
Fixes#9839