Reset to Initial State (RIS) doesn't reset very much #159
Labels
Product-Conhost
For issues in the Console codebase
Resolution-Fix-Available
It's available in an Insiders build or a release
Milestone
Your Windows build number:
Microsoft Windows [Version 10.0.16299.371]
What you're doing and what's happening:
I was experimenting with the RIS (Reset to Initial State) escape sequence,
ESC c
, to see which properties are actually reset by it. It turns out that quite a lot of properties aren't reset in the Windows console (at least the version that I have).I've also tested on XTerm, which does reset most of these properties. Below are a few test cases comparing the behaviour between XTerm (on the left) and the Windows console (on the right).
Scroll margins: If RIS reset the scroll margins, this should ouput on line 8, and not line 2.
Saved cursor position (DECSC): If RIS resets the saved cursor position, this should output in the top left of the screen, and not offset at row 3, column 6.
Saved cursor position (ANSISC): Again if RIS resets the saved cursor position, this should output in the top left of the screen, and not offset at row 3, column 6.
User-defined tab stops: If RIS resets the tab stops, this should output at column 8, not column 2.
Cursor visibility: If RIS resets the cursor visibility, this should show a visible cursor.
Cursor blinking: If RIS resets the cursor blinking, this should show a blinking cursor.
This is not really something that can be shown in a screenshot, but I'm seeing a static cursor in the Windows console. I couldn't test on Linux because the ATT160 sequence doesn't appear to be supported on any of the Linux terminal emulators that I tried.
Window title: If RIS resets the title, this should not leave the title displaying the letter X. This is one case that isn't reset by XTerm either (or any of the other Linux emulators I tried).
Cursor key application mode: If RIS resets the cursor key mode, this test should generate output in the form
^[[A^[[B^[[C^[[D
, and not^[OA^[OB^[OC^[OC
.I'd expect similar behaviour for the keypad application mode (DECKPAM), but that doesn't appear to be working in the Windows console at all, so I couldn't test whether the reset has any effect on it.
What's wrong / what should be happening instead:
The VT100 manual defines the RIS command as: "Resets the VT100 to its initial state, i.e. the state it has after it is powered on." Given that definition, I would have expected all of the above mentioned properties to be reset. That said, I could understand the window title not being reset if nobody else supports that either (and I guess none of the VT terminals would have had a window title anyway).
The text was updated successfully, but these errors were encountered: