Skip to content
Browse files

Restore original behaviour to put cursor on beginning of match in CTR…

…L-R search.
  • Loading branch information...
1 parent 638b521 commit ef7fab5d304e81618de786f77862fbfee89f0677 @hns hns committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/jline/ConsoleReader.java
View
2 src/main/java/jline/ConsoleReader.java
@@ -1781,7 +1781,7 @@ public void printSearchStatus(String searchTerm, String match) throws IOExceptio
int i = match.indexOf(searchTerm);
printString("\r(reverse-i-search) `" + searchTerm + "': " + match + "\u001b[K");
// FIXME: our ANSI using back() does not work here
- printCharacters(BACKSPACE, match.length());
+ printCharacters(BACKSPACE, match.length() - i);
flushConsole();
}

0 comments on commit ef7fab5

Please sign in to comment.
Something went wrong with that request. Please try again.