From f860a723e0c0c892575d3e0078e885142ee75c50 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 3 Nov 2006 15:20:15 +0000 Subject: [PATCH] Fixed forum-12405: BracketMatchingStyle bug in Text Editor Control - one line patch by Dan Fowler git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2014 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Gui/BracketHighlighter.cs | 6 +++--- .../Project/Src/Gui/TextEditorControlBase.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/BracketHighlighter.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/BracketHighlighter.cs index bb36a86ff8..852c3b7918 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/BracketHighlighter.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/BracketHighlighter.cs @@ -79,9 +79,9 @@ namespace ICSharpCode.TextEditor } char word = document.GetCharAt(Math.Max(0, Math.Min(document.TextLength - 1, searchOffset))); - Point endP = document.OffsetToPosition(offset); + Point endP = document.OffsetToPosition(searchOffset); if (word == opentag) { - if (offset < document.TextLength) { + if (searchOffset < document.TextLength) { int bracketOffset = TextUtilities.SearchBracketForward(document, searchOffset + 1, opentag, closingtag); if (bracketOffset >= 0) { Point p = document.OffsetToPosition(bracketOffset); @@ -89,7 +89,7 @@ namespace ICSharpCode.TextEditor } } } else if (word == closingtag) { - if (offset > 0) { + if (searchOffset > 0) { int bracketOffset = TextUtilities.SearchBracketBackward(document, searchOffset - 1, opentag, closingtag); if (bracketOffset >= 0) { Point p = document.OffsetToPosition(bracketOffset); diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextEditorControlBase.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextEditorControlBase.cs index 737c688e32..eb17ab247f 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextEditorControlBase.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextEditorControlBase.cs @@ -444,7 +444,7 @@ namespace ICSharpCode.TextEditor /// [Category("Behavior")] [DefaultValue(false)] - [Description("Allows the caret to be places beyonde the end of line")] + [Description("Allows the caret to be placed beyond the end of line")] public bool AllowCaretBeyondEOL { get { return document.TextEditorProperties.AllowCaretBeyondEOL;