Replace: never repair old cursor position after replacement, just go ahead.

This commit is contained in:
andrey.zaytsev
2011-09-12 16:50:21 +04:00
parent 3838cd6b82
commit 57cf40ad0c
@@ -292,7 +292,7 @@ public class SearchResults implements DocumentListener {
boolean justReplaced = next != null;
boolean toPush = true;
if (justReplaced || (toPush = !repairCursorFromStack())) {
if (!tryToRepairOldCursor(oldCursorRange)) {
if (justReplaced || !tryToRepairOldCursor(oldCursorRange)) {
if (myFindModel != null) {
if(oldCursorRange != null && !myFindModel.isGlobal()) {
myCursor = firstOccurrenceAfterOffset(oldCursorRange.getEndOffset());