xterm: implement RIS (ESC c) and DECSTR (CSI ! p)

ESC c was ignored, so `reset` could not recover a terminal left in the
alternate screen with a hidden cursor, a scroll region or mouse modes.
RIS now resets every mode, the attributes, character sets, tab stops,
margins and saved cursors, returns to the main screen and clears it
(scrollback is kept, as in xterm). DECSTR resets modes, attributes and
margins without touching the text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 23:27:50 +00:00
parent 30b32921fe
commit 31d00e057c
7 changed files with 174 additions and 1 deletions
+10
View File
@@ -471,6 +471,16 @@ class _TerminalDebuggerHandler implements EscapeHandler {
onCommand('setCursorUnderline');
}
@override
void resetTerminal() {
onCommand('resetTerminal');
}
@override
void softResetTerminal() {
onCommand('softResetTerminal');
}
@override
void cursorForwardTab(int amount) {
onCommand('cursorForwardTab $amount');