From 21920038220d2ba4d91d80c17f362b50444e065e Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Wed, 8 Feb 2006 18:12:07 +0000 Subject: [PATCH] The xml editor now keeps the existing document folds if the xml is no longer well formed. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1107 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../XmlEditor/Project/Src/XmlFoldingStrategy.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFoldingStrategy.cs b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFoldingStrategy.cs index d715f1e911..03eb1065b0 100644 --- a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFoldingStrategy.cs +++ b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFoldingStrategy.cs @@ -89,7 +89,7 @@ namespace ICSharpCode.XmlEditor /// elements. /// bool showAttributesWhenFolded = false; - + public XmlFoldingStrategy() { } @@ -136,7 +136,8 @@ namespace ICSharpCode.XmlEditor } } catch (Exception) { // If the xml is not well formed keep the foldings - // we found. + // that already exist in the document. + return document.FoldingManager.FoldMarker; } return foldMarkers;