Scroll Up (SU) and Delete Line (DL) should add the line to the scrollback
The Scroll Up (SU) escape sequence should add the scrolled out line(s) to the scrollback buffer (unless a scrolling region starting at row 2 or below is set up).
Update: The Delete Line (DL) escape sequence should do the same if the cursor is in row 1.
Example 1:
At size 80x24 execute seq 100
and then printf '\e[1S'
.
Notice that the number 80 is now missing from the list. In xterm
you get the numbers 1..100 with no gap.
Example 2 (based on the real life bug filed at https://github.com/gnunn1/tilix/issues/1979)
Execute seq 100
followed by irb
(Interactive Ruby Shell). Here press Enter
a few times, or press let's say h
which scrolls up by 2 lines to show the 2 possible autocompletions.
Notice again that the scrollback buffer's contents is broken, whereas it's intact in xterm
.
irb
queries the mouse position, and if it's at the bottom then for some mysterious reason it prefers to use this escape sequence.