Hide cursor when printing output

This commit is contained in:
Mike Cifelli 2017-03-18 16:55:35 -04:00
parent 31ca72e534
commit 072a432026
1 changed files with 4 additions and 0 deletions

View File

@ -72,9 +72,12 @@ public class LispTerminal {
try { try {
for (int c = outputReader.read(); c != -1; c = outputReader.read()) { for (int c = outputReader.read(); c != -1; c = outputReader.read()) {
synchronized (this) { synchronized (this) {
terminal.setCursorVisible(false);
if (c == 'x') { if (c == 'x') {
terminal.flush(); terminal.flush();
origin = terminal.getCursorPosition(); origin = terminal.getCursorPosition();
terminal.setCursorVisible(true);
} else { } else {
terminal.putCharacter((char) c); terminal.putCharacter((char) c);
} }
@ -85,6 +88,7 @@ public class LispTerminal {
e.printStackTrace(); e.printStackTrace();
} }
terminal.setCursorVisible(true);
terminal.close(); terminal.close();
} }