Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix delete key regression on non-ANSI terminals

  • Loading branch information...
commit d154af3b4cfa17472bdc7223e70ad3b22ff6be9b 1 parent de5f366
@hns hns authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/main/java/jline/ConsoleReader.java
View
10 src/main/java/jline/ConsoleReader.java
@@ -1126,9 +1126,13 @@ private final void drawBuffer(final int clear) throws IOException {
printCharacters(chars);
clearAhead(clear);
- if (chars.length > 0) {
- // don't ask, it works
- back(Math.max(chars.length - 1, 1));
+ if (terminal.isANSISupported()) {
+ if (chars.length > 0) {
+ // don't ask, it seems to work
+ back(Math.max(chars.length - 1, 1));
+ }
+ } else {
+ back(chars.length);
}
flushConsole();
}
Please sign in to comment.
Something went wrong with that request. Please try again.