diff options
author | 2016-04-13 12:35:38 +0000 | |
---|---|---|
committer | 2016-04-14 07:36:58 +0000 | |
commit | 5a2a275aab57acfe8e85ca915fc6f323a652b432 (patch) | |
tree | 3add07286cdc854557af21def5c63183770d9685 | |
parent | ba8700ee63efe26c1a09d288129ced18a265ff89 (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.java | 8 |
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); |