Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

there was a bug in UnixTerminal

when pressing the escape key and then one of the arrow keys
  • Loading branch information...
commit e710b75b86a768f23f8e9a89b85007775dded82d 1 parent 006b007
avedusav authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/main/java/jline/UnixTerminal.java
View
9 src/main/java/jline/UnixTerminal.java
@@ -137,7 +137,14 @@ else if (c == '\b')
// a sequence of 3 characters. E.g., the up arrow
// key yields 27, 91, 68
if (c == ARROW_START) {
- c = readCharacter(in);
+ //also the escape key is 27
+ //thats why we read until we
+ //have something different than 27
+ //this is a bugfix, because otherwise
+ //pressing escape and than an arrow key
+ //was an undefined state
+ while (c == ARROW_START)
+ c = readCharacter(in);
if (c == ARROW_PREFIX || c == O_PREFIX) {
c = readCharacter(in);
if (c == ARROW_UP) {
Please sign in to comment.
Something went wrong with that request. Please try again.