You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[term-state] DECSTBM accepts top == bottom, which xterm and ghostty reject #3261
set_scroll_region accepts DECSTBM with top == bottom (a one-row region). xterm and ghostty reject it: the parameter pair is invalid when the top margin is not strictly above the bottom margin, and the sequence is ignored wholesale.
Bitty currently honours it, which produces a one-row scroll region — a state no reference terminal would enter, and the shape that makes a leaked margin look catastrophic (a whole pane reduced to a single scrolling row).
Fix
Reject top == bottom in set_scroll_region, keeping the existing "invalid requests are ignored wholesale" behaviour for top > bottom. Add a regression test for both rejected shapes and one for the accepted boundary (top + 1 == bottom), and check whether any existing test or fixture depends on the one-row region.
Context
Found while fixing #3259 (per-screen scroll margins, divergence D-1). The reproductions for that fix originally used CSI 1;1r, which no reference terminal accepts; they now use a five-row region. Tracked separately so the compatibility change is reviewable on its own.
Activity