editors should only handle bulk changes of their own documents (otherwise main editor constantly scrolls during test run)

This commit is contained in:
peter
2013-08-31 11:31:55 +02:00
parent 445acfb2d0
commit 0b3f5d315e
2 changed files with 8 additions and 0 deletions
@@ -6223,11 +6223,15 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
class EditorDocumentBulkUpdateAdapter implements DocumentBulkUpdateListener {
@Override
public void updateStarted(@NotNull Document doc) {
if (doc != getDocument()) return;
bulkUpdateStarted();
}
@Override
public void updateFinished(@NotNull Document doc) {
if (doc != getDocument()) return;
bulkUpdateFinished();
}
}
@@ -602,11 +602,15 @@ public class SoftWrapModelImpl implements SoftWrapModelEx, PrioritizedDocumentLi
@Override
public void updateStarted(@NotNull Document doc) {
if (doc != myEditor.getDocument()) return;
myBulkUpdateInProgress = true;
}
@Override
public void updateFinished(@NotNull Document doc) {
if (doc != myEditor.getDocument()) return;
myBulkUpdateInProgress = false;
if (!isSoftWrappingEnabled()) {
return;