aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-04-13 12:35:38 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-04-14 07:36:58 +0000
commit5a2a275aab57acfe8e85ca915fc6f323a652b432 (patch)
tree3add07286cdc854557af21def5c63183770d9685
parentba8700ee63efe26c1a09d288129ced18a265ff89 (diff)
experimental UI: only redraw progress bar after event in curses mode
Whenever an event has to be reported to the scroll-back buffer, the old progress bar has to be removed first. Afterwards, it is redrawn. In a setting without cursor control, this, however, litters the log with lots status bars. Therefore, only redraw the progress bar after an event if cursor control is available. Note that the refresh thread will eventually ensure an up-to-date progress bar anyway. -- MOS_MIGRATED_REVID=119737382
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java
index ad0817e665..db0c557d00 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalEventHandler.java
@@ -112,7 +112,9 @@ public class ExperimentalEventHandler extends BlazeCommandEventHandler {
}
stream.flush();
if (!buildComplete) {
- addProgressBar();
+ if (cursorControl) {
+ addProgressBar();
+ }
terminal.flush();
}
break;
@@ -253,7 +255,9 @@ public class ExperimentalEventHandler extends BlazeCommandEventHandler {
crlf();
}
crlf();
- addProgressBar();
+ if (cursorControl) {
+ addProgressBar();
+ }
terminal.flush();
} catch (IOException e) {
LOG.warning("IO Error writing to output stream: " + e);