Skip to content

Commit

Permalink
Avoid inserting duplicate line break in printAbove if line ends with …
Browse files Browse the repository at this point in the history
…ANSI reset
  • Loading branch information
stephan-gh committed Jun 8, 2019
1 parent 9ef1cc2 commit 7b3aa20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ public void printAbove(String str) {
if (reading) {
display.update(Collections.emptyList(), 0);
}
if (str.endsWith("\n")) {
if (str.endsWith("\n") || str.endsWith("\n\033[m") || str.endsWith("\n\033[0m")) {
terminal.writer().print(str);
} else {
terminal.writer().println(str);
Expand Down

0 comments on commit 7b3aa20

Please sign in to comment.