From 072a432026a62e16b631ffe3c41f7bad5ff7054f Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Sat, 18 Mar 2017 16:55:35 -0400 Subject: [PATCH] Hide cursor when printing output --- src/terminal/LispTerminal.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/terminal/LispTerminal.java b/src/terminal/LispTerminal.java index 3374873..7bc5faa 100644 --- a/src/terminal/LispTerminal.java +++ b/src/terminal/LispTerminal.java @@ -72,9 +72,12 @@ public class LispTerminal { try { for (int c = outputReader.read(); c != -1; c = outputReader.read()) { synchronized (this) { + terminal.setCursorVisible(false); + if (c == 'x') { terminal.flush(); origin = terminal.getCursorPosition(); + terminal.setCursorVisible(true); } else { terminal.putCharacter((char) c); } @@ -85,6 +88,7 @@ public class LispTerminal { e.printStackTrace(); } + terminal.setCursorVisible(true); terminal.close(); }