Browse Source

Fixed SD2-733 - Index out of range exception when typing in an element end tag character inside the xml comments of a VB.NET class

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1235 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 20 years ago
parent
commit
106b0afcf0
  1. 2
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs

2
src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs

@ -406,7 +406,7 @@ namespace VBNetBinding.FormattingStrategy
int column = textArea.Caret.Offset - curLine.Offset; int column = textArea.Caret.Offset - curLine.Offset;
int index = Math.Min(column - 1, curLineText.Length - 1); int index = Math.Min(column - 1, curLineText.Length - 1);
while (index >= 0 && curLineText[index] != '<') { while (index > 0 && curLineText[index] != '<') {
--index; --index;
if(curLineText[index] == '/') if(curLineText[index] == '/')
return 0; // the tag was an end tag or already return 0; // the tag was an end tag or already

Loading…
Cancel
Save