mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 01:05:48 +02:00
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>