IDEA-99600 Exception: Unexpected caret move request

This commit is contained in:
Denis.Zhdanov
2013-02-04 09:05:14 +04:00
parent 8efb7d08ce
commit ac4e428e4f
2 changed files with 2 additions and 2 deletions
@@ -622,7 +622,7 @@ public class CaretModelImpl implements CaretModel, PrioritizedDocumentListener,
@Override
public boolean isUpToDate() {
return !myIsInUpdate;
return !myIsInUpdate && !myReportCaretMoves;
}
@Override
@@ -395,7 +395,7 @@ public class FoldingModelImpl implements FoldingModelEx, PrioritizedDocumentList
boolean oldCaretPositionSaved = myCaretPositionSaved;
if (moveCaretFromCollapsedRegion) {
if (moveCaretFromCollapsedRegion && myEditor.getCaretModel().isUpToDate()) {
if (offsetToUse >= 0) {
myEditor.getCaretModel().moveToOffset(offsetToUse);
}