Skip to content

Commit

Permalink
Merge pull request #401 from Minecrell/printabove-ansi-reset
Browse files Browse the repository at this point in the history
Avoid inserting duplicate line break in printAbove if line ends with ANSI reset
  • Loading branch information
gnodet committed Jul 4, 2019
2 parents 0376b96 + 7b3aa20 commit be2dbb9
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 be2dbb9

Please sign in to comment.