From 65d61599f82a89b58b7fd7e5b35dccc7e4f7e933 Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Mon, 30 Nov 2015 11:46:42 +0300 Subject: [PATCH] revert commit 86d3361 as it's causing exceptions on editor opening --- .../openapi/editor/impl/SoftWrapModelImpl.java | 4 ---- .../editor/impl/view/EditorSizeManager.java | 15 --------------- 2 files changed, 19 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/SoftWrapModelImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/SoftWrapModelImpl.java index 0a44bcfbca52..596613e3b982 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/SoftWrapModelImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/SoftWrapModelImpl.java @@ -754,10 +754,6 @@ public class SoftWrapModelImpl implements SoftWrapModelEx, PrioritizedInternalDo return dumpState(); } - public boolean isDirty() { - return myDirty; - } - /** * Defines generic interface for the command that may be proceeded in both 'soft wraps aware' and * 'soft wraps unaware' modes. diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorSizeManager.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorSizeManager.java index 763ad29cc9fd..25f0b0c0989c 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorSizeManager.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorSizeManager.java @@ -70,10 +70,6 @@ class EditorSizeManager implements PrioritizedDocumentListener, Disposable, Fold private int myFoldingChangeStartOffset = Integer.MAX_VALUE; private int myFoldingChangeEndOffset = Integer.MIN_VALUE; - private boolean myDirty; // true if we cannot calculate preferred size now because soft wrap model was invalidated after editor - // became hidden. myLineWidths contents is irrelevant in such a state. Previously calculated preferred size - // is kept until soft wraps will be recalculated and size calculations will become possible - private final List myDeferredRanges = new ArrayList(); private final SoftWrapAwareDocumentParsingListenerAdapter mySoftWrapChangeListener = new SoftWrapAwareDocumentParsingListenerAdapter() { @@ -183,7 +179,6 @@ class EditorSizeManager implements PrioritizedDocumentListener, Disposable, Fold private int getPreferredWidth() { if (myWidthInPixels < 0) { assert !myDocument.isInBulkUpdate(); - assert !myDirty; myWidthInPixels = calculatePreferredWidth(); } validateMaxLineWithExtension(); @@ -278,11 +273,6 @@ class EditorSizeManager implements PrioritizedDocumentListener, Disposable, Fold } private void doInvalidateRange(int startOffset, int endOffset) { - if (myDirty) return; - if (myEditor.getSoftWrapModel().isDirty()) { - myDirty = true; - return; - } myWidthInPixels = -1; int startVisualLine = myView.offsetToVisualLine(startOffset, false); int endVisualLine = myView.offsetToVisualLine(endOffset, true); @@ -319,11 +309,6 @@ class EditorSizeManager implements PrioritizedDocumentListener, Disposable, Fold } private void onTextLayoutPerformed(int startOffset, int endOffset) { - if (myDirty) return; - if (myEditor.getSoftWrapModel().isDirty()) { - myDirty = true; - return; - } boolean purePaintingMode = myEditor.isPurePaintingMode(); boolean foldingEnabled = myEditor.getFoldingModel().isFoldingEnabled(); myEditor.setPurePaintingMode(false);