mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-07 17:41:08 +01:00
Recognize '\033c' - RIS, reset terminal state
This commit is contained in:
parent
bee305e53f
commit
b2b39abacd
2 changed files with 10 additions and 0 deletions
|
|
@ -1229,6 +1229,11 @@ public final class TerminalEmulator {
|
|||
mScreen.blockSet(mRightMargin - 1, mTopMargin, 1, rows, ' ', TextStyle.encode(mForeColor, mBackColor, 0));
|
||||
}
|
||||
break;
|
||||
case 'c': // RIS - Reset to Initial State (http://vt100.net/docs/vt510-rm/RIS).
|
||||
reset();
|
||||
blockClear(0, 0, mColumns, mRows);
|
||||
setCursorPosition(0, 0);
|
||||
break;
|
||||
case 'D': // INDEX
|
||||
doLinefeed();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@ public class DecSetTest extends TerminalTestCase {
|
|||
assertFalse(mTerminal.isShowingCursor());
|
||||
mTerminal.reset();
|
||||
assertTrue("Resetting the terminal should show the cursor", mTerminal.isShowingCursor());
|
||||
|
||||
enterString("\033[?25l");
|
||||
assertFalse(mTerminal.isShowingCursor());
|
||||
enterString("\033c"); // RIS resetting should reveal cursor.
|
||||
assertTrue(mTerminal.isShowingCursor());
|
||||
}
|
||||
|
||||
/** DECSET 2004, controls bracketed paste mode. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue