diff --git a/src/org/rascalmpl/repl/TerminalProgressBarMonitor.java b/src/org/rascalmpl/repl/TerminalProgressBarMonitor.java index 4d4749bb09a..cc605941d2b 100644 --- a/src/org/rascalmpl/repl/TerminalProgressBarMonitor.java +++ b/src/org/rascalmpl/repl/TerminalProgressBarMonitor.java @@ -138,9 +138,14 @@ private class ProgressBar { private final Instant startTime; private Duration duration; private String message = ""; + + /** + * Stepper is incremented with every jobStep that has an visible effect on the progress bar. + * It is used to index into `clocks` or `twister` to create an animation effect. + */ private int stepper = 1; private final String[] clocks = new String[] {"🕐" , "🕑", "🕒", "🕓", "🕔", "🕕", "🕖", "🕗", "🕘", "🕙", "🕛"}; - private final String[] twister = new String[] {"|" , "/", "-", "\\", "|", "/", "-", "\\"}; + private final String[] twister = new String[] {"." , ".", "o", "o", "O","O", "O", "o", "o", ".", "."}; public int nesting = 0; ProgressBar(String name, int max) { @@ -154,7 +159,7 @@ private class ProgressBar { } void worked(int amount, String message) { - this.current += Math.min(amount, max); + this.current = Math.min(current + amount, max); this.duration = Duration.between(startTime, Instant.now()); this.message = message; }