Setting up an invalid scrolling region differs from xterm
80x24 size, printf '\e[30;40r'
(define an offscreen scrolling region) or printf '\[e20;10r'
(define a negative one).
Our comment under Terminal::DECSTBM()
says
If top > bottom, the command is ignored.
This is what xterm does. Xterm also ignores the command if it would define a one-line or zero or negative sized region. (I.e. the previous scrolling region remans in effect, also, no cursor homing.)
More precisely, if the numbers after clamping do not define a region of 2 or more lines then the sequence is ignored. E.g. with 24 lines, \e[23;50r
is clamped to set up the 2-line region of lines 23 and 24, however, \e[24;50r
is completely ignored.
Our current code, however, restores the default scrolling region in these cases.