From 538974e08e971cab49a8324885b8eed5b28ba851 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Fri, 7 Oct 2005 10:49:19 +0000 Subject: [PATCH] Fixed SD2-473. A KeyNotFound exception is no longer thrown if the highlighting strategy does not contain a LineComment property. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@540 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs index 171342cfd6..9f8ceca69c 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs @@ -287,7 +287,7 @@ namespace ICSharpCode.TextEditor.Actions } string comment = null; - if (textArea.Document.HighlightingStrategy.Properties["LineComment"] != null) { + if (textArea.Document.HighlightingStrategy.Properties.ContainsKey("LineComment")) { comment = textArea.Document.HighlightingStrategy.Properties["LineComment"].ToString(); }