mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup after batch folding operation end even in case of exception: to avoid observing invalid fold regions on subsequent batch folding operations
This commit is contained in:
@@ -212,17 +212,20 @@ public class FoldingModelImpl implements FoldingModelEx, PrioritizedDocumentList
|
||||
|
||||
myIsBatchFoldingProcessing = true;
|
||||
myFoldTree.myCachedLastIndex = -1;
|
||||
operation.run();
|
||||
myFoldTree.myCachedLastIndex = -1;
|
||||
try {
|
||||
operation.run();
|
||||
} finally {
|
||||
myFoldTree.myCachedLastIndex = -1;
|
||||
|
||||
if (!oldBatchFlag) {
|
||||
if (myFoldRegionsProcessed) {
|
||||
notifyBatchFoldingProcessingDone(moveCaret);
|
||||
myFoldRegionsProcessed = false;
|
||||
if (!oldBatchFlag) {
|
||||
if (myFoldRegionsProcessed) {
|
||||
notifyBatchFoldingProcessingDone(moveCaret);
|
||||
myFoldRegionsProcessed = false;
|
||||
}
|
||||
myIsBatchFoldingProcessing = false;
|
||||
}
|
||||
myIsBatchFoldingProcessing = false;
|
||||
myDoNotCollapseCaret = oldDontCollapseCaret;
|
||||
}
|
||||
myDoNotCollapseCaret = oldDontCollapseCaret;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user