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;