Permalink
Browse files

Make sure searchIndex is initialized when we enter CTRL-R search mode

  • Loading branch information...
1 parent d602e9d commit 638b5217fd4c877a86c1c70e7baf9b31abf3ba72 @hns hns committed Apr 30, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/main/java/jline/ConsoleReader.java
@@ -683,6 +683,7 @@ public String readLine(final String prompt, final Character mask)
printSearchStatus(searchTerm.toString(),
searchIndex > -1 ? history.getHistory(searchIndex) : "");
} else {
+ searchIndex = -1;
printSearchStatus("", "");
}
break;

0 comments on commit 638b521

Please sign in to comment.