|
|
|
@ -23,16 +23,13 @@ namespace ICSharpCode.VBNetBinding |
|
|
|
if (offset > 0) { |
|
|
|
if (offset > 0) { |
|
|
|
char c = document.GetCharAt(offset - 1); |
|
|
|
char c = document.GetCharAt(offset - 1); |
|
|
|
int index = openingBrackets.IndexOf(c); |
|
|
|
int index = openingBrackets.IndexOf(c); |
|
|
|
int otherOffset = -1; int ind = -1; |
|
|
|
int otherOffset = -1; |
|
|
|
if (index > -1) { |
|
|
|
if (index > -1) |
|
|
|
otherOffset = SearchBracketForward(document, offset, openingBrackets[index], closingBrackets[index]); |
|
|
|
otherOffset = SearchBracketForward(document, offset, openingBrackets[index], closingBrackets[index]); |
|
|
|
ind = index; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
index = closingBrackets.IndexOf(c); |
|
|
|
index = closingBrackets.IndexOf(c); |
|
|
|
if (index > -1) { |
|
|
|
if (index > -1) |
|
|
|
otherOffset = SearchBracketBackward(document, offset - 2, openingBrackets[index], closingBrackets[index]); |
|
|
|
otherOffset = SearchBracketBackward(document, offset - 2, openingBrackets[index], closingBrackets[index]); |
|
|
|
ind = index; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (otherOffset > -1) |
|
|
|
if (otherOffset > -1) |
|
|
|
return new BracketSearchResult(Math.Min(offset - 1, otherOffset), 1, |
|
|
|
return new BracketSearchResult(Math.Min(offset - 1, otherOffset), 1, |
|
|
|
|