revert commit d23cdff

This commit is contained in:
Dmitry Batrak
2017-03-20 12:12:15 +03:00
parent 1fb982c64d
commit 56bd3e5e8a
2 changed files with 1 additions and 5 deletions
@@ -48,7 +48,7 @@ class FoldRegionImpl extends RangeMarkerImpl implements FoldRegion {
@NotNull String placeholder,
@Nullable FoldingGroup group,
boolean shouldNeverExpand) {
super((DocumentEx)editor.getDocument(), startOffset, endOffset,false);
super((DocumentEx)editor.getDocument(), startOffset, endOffset,true);
myGroup = group;
myShouldNeverExpand = shouldNeverExpand;
myIsExpanded = true;
@@ -61,7 +61,6 @@ public class FoldingModelImpl implements FoldingModelEx, PrioritizedInternalDocu
private boolean myIsFoldingEnabled;
private final EditorImpl myEditor;
private final RangeMarkerTree<FoldRegionImpl> myRegionTree;
private final FoldRegionsTree myFoldTree;
private TextAttributes myFoldTextAttributes;
private boolean myIsBatchFoldingProcessing;
@@ -78,7 +77,6 @@ public class FoldingModelImpl implements FoldingModelEx, PrioritizedInternalDocu
myIsFoldingEnabled = true;
myIsBatchFoldingProcessing = false;
myDoNotCollapseCaret = false;
myRegionTree = new RangeMarkerTree<>(editor.getDocument());
myFoldTree = new FoldRegionsTree() {
@Override
protected boolean isFoldingEnabled() {
@@ -316,7 +314,6 @@ public class FoldingModelImpl implements FoldingModelEx, PrioritizedInternalDocu
public void dispose() {
doClearFoldRegions();
myRegionTree.dispose();
}
@Override
@@ -583,7 +580,6 @@ public class FoldingModelImpl implements FoldingModelEx, PrioritizedInternalDocu
@Nullable FoldingGroup group,
boolean neverExpands) {
FoldRegionImpl region = new FoldRegionImpl(myEditor, startOffset, endOffset, placeholder, group, neverExpands);
myRegionTree.addInterval(region, startOffset, endOffset, false, false, 0);
LOG.assertTrue(region.isValid());
return region;
}