From f7e9f07a4e899dc0627aa840ef47622277feaacd Mon Sep 17 00:00:00 2001 From: Helder Sepulveda Date: Thu, 25 May 2017 10:18:01 -0400 Subject: [PATCH] Rollback change on FoldingManager.cs --- ICSharpCode.AvalonEdit/Folding/FoldingManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.AvalonEdit/Folding/FoldingManager.cs b/ICSharpCode.AvalonEdit/Folding/FoldingManager.cs index bbf73e7..33767b4 100644 --- a/ICSharpCode.AvalonEdit/Folding/FoldingManager.cs +++ b/ICSharpCode.AvalonEdit/Folding/FoldingManager.cs @@ -279,12 +279,12 @@ namespace ICSharpCode.AvalonEdit.Folding // auto-close #regions only when opening the document if (isFirstUpdate) { section.IsFolded = newFolding.DefaultClosed; + isFirstUpdate = false; } section.Tag = newFolding; } section.Title = newFolding.Name; } - isFirstUpdate = false; // remove all outstanding old foldings: while (oldFoldingIndex < oldFoldings.Length) { FoldingSection oldSection = oldFoldings[oldFoldingIndex++];