LF shouldn't scroll the viewport when below the bottom margin #2657
Labels
Area-VT
Virtual Terminal sequence support
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Product-Conhost
For issues in the Console codebase
Resolution-Fix-Committed
Fix is checked in, but it might be 3-4 weeks until a release.
Environment
Steps to reproduce
Open a WSL conhost shell, and execute the following command:
This sets the DECSTBM margins to the top two lines, moves the cursor position to the very bottom of the screen (i.e. below the bottom margin), and then writes out "Bottom line?" followed by 3 line feeds, and finally resets the margins.
Expected behavior
The line feeds should not cause the viewport to scroll when below the bottom margin, so the "Bottom line?" text should remain on the last line of the screen.
This is what the above test case looks like in XTerm:
And here's an extract from the DEC STD 070 documentation for the LF control, explaining that behaviour:
Actual behavior
In the Windows console, the line feeds cause the viewport to scroll up, just as they would if there were no margins set, so the "Bottom line?" actually ends up 3 lines from the bottom, and the top line has scrolled out of view.
The text was updated successfully, but these errors were encountered: