Use RIS for terminal reset.

This commit is contained in:
Florian Nücke
2022-01-08 06:30:16 +01:00
parent 99fa59cfc6
commit 63602bfef7
2 changed files with 3 additions and 5 deletions

View File

@@ -9,10 +9,8 @@ public final class TerminalUtils {
private static final ByteBuffer TERMINAL_RESET_SEQUENCE = ByteBuffer.wrap(new byte[]{
// Make sure we're in normal mode.
'J',
// Reset color and style.
'\033', '[', '0', 'm',
// Clear screen.
'\033', '[', '2', 'J'
// Reset.
'\033', 'c',
});
///////////////////////////////////////////////////////////////////

View File

@@ -366,7 +366,7 @@ public final class Terminal {
style = DEFAULT_STYLE;
clear();
Arrays.fill(tabs, false);
for (int i = 0; i < WIDTH; i++) {
for (int i = 1; i < WIDTH; i++) {
if (i % TAB_WIDTH == 0) {
tabs[i] = true;
}