Skip to content

Commit

Permalink
nano: fixed bug in 'search and replace'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Oct 4, 2019
1 parent b996a9a commit 20076f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtins/src/main/java/org/jline/builtins/Nano.java
Original file line number Diff line number Diff line change
Expand Up @@ -2898,8 +2898,8 @@ void searchAndReplace() {
found = buffer.nextSearch();
if (found) {
int[] re = buffer.highlightStart();
int col = searchBackwards ? buffer.getLine(re[0]).length() - re[1] : re[1];
int match = re[0]*100000 + col;
int col = searchBackwards ? buffer.length(buffer.getLine(re[0])) - re[1] : re[1];
int match = re[0]*10000 + col;
if (matches.contains(match)) {
found = false;
break;
Expand Down

0 comments on commit 20076f2

Please sign in to comment.