From 30970a121e35e30bbc865699b3b51226b9269137 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Fri, 12 May 2017 14:07:05 +0200 Subject: [PATCH] Problems when TERM=ansi is used on an xterm terminal, fixes #123 --- terminal/src/main/java/org/jline/utils/Display.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/terminal/src/main/java/org/jline/utils/Display.java b/terminal/src/main/java/org/jline/utils/Display.java index 8caa603b9..3c42cc4ac 100644 --- a/terminal/src/main/java/org/jline/utils/Display.java +++ b/terminal/src/main/java/org/jline/utils/Display.java @@ -301,9 +301,10 @@ public void update(List newLines, int targetCursorPos) { terminal.puts(Capability.clr_eol); } } else if (atRight) { - if (this.wrapAtEol) - cursorPos++; - else { + if (this.wrapAtEol) { + terminal.writer().write(" \b"); + cursorPos++; + } else { terminal.puts(Capability.carriage_return); // CR / not newline. cursorPos = curCol; }