Browse Source

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
shortcuts
Daniel Grunwald 19 years ago
parent
commit
f860a723e0
  1. 6
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/BracketHighlighter.cs
  2. 2
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextEditorControlBase.cs

6
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/BracketHighlighter.cs

@ -79,9 +79,9 @@ namespace ICSharpCode.TextEditor @@ -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 @@ -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);

2
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextEditorControlBase.cs

@ -444,7 +444,7 @@ namespace ICSharpCode.TextEditor @@ -444,7 +444,7 @@ namespace ICSharpCode.TextEditor
/// </value>
[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;

Loading…
Cancel
Save