The SU (scroll up) sequence should pan the viewport down #11078
Labels
Area-VT
Virtual Terminal sequence support
Help Wanted
We encourage anyone to jump in on these.
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-2
A description (P2)
Product-Conhost
For issues in the Console codebase
Milestone
Windows Terminal version (or Windows build number)
10.0.18363.1500, 1.10.1933.0
Other Software
No response
Steps to reproduce
for i in {1..100}; do echo $i; done; tput indn 10
Expected Behavior
There should be no gap in the sequence of numbers.
Actual Behavior
There are numbers missing from the sequence at the point where they've scrolled off screen.
The problem here is that there are two ways in which the
SU
escape sequence is typically implemented in Linux terminals. Most terminals, including XTerm, will pan the viewport down, as if you'd executed a linefeed at the bottom of the window. Lines at the top of the window will be moved into the scrollback buffer, and nothing is lost.On VTE-based terminals, and Konsole, the
SU
escape sequence will just scroll the buffer contents up, constrained within the visible area. This is equivalent of deleting lines from the top of the window, so anything that scrolls off screen is lost. And that's the behavior that we're currently matching.From a DEC VT-compatibility point of view, I don't think either interpretation is correct, so that's not a deciding factor. But the reason I think we should be matching XTerm, is because the
indn
terminfo capability is defined asSU
, and theind
capability is defined as a linefeed control, so I think there is an expectation thatindn
should produce the equivalent of multiple linefeeds.If we aren't going to do that, then we probably shouldn't be using xterm-256color for our
TERM
value.The text was updated successfully, but these errors were encountered: