Browse Source

Fix ArgumentOutOfRangeException when double-clicking the top-most pixel in the exception dialog's text box.

pull/28/head
Daniel Grunwald 13 years ago
parent
commit
becbe5e4ab
  1. 2
      src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs

2
src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs

@ -81,6 +81,8 @@ namespace ICSharpCode.SharpDevelop.Services
//string textLine = TextUtilities.GetLineAsString(textEditorControl.Document, line); //string textLine = TextUtilities.GetLineAsString(textEditorControl.Document, line);
Point clickPos = exceptionView.PointToClient(Control.MousePosition); Point clickPos = exceptionView.PointToClient(Control.MousePosition);
int index = exceptionView.GetCharIndexFromPosition(clickPos); int index = exceptionView.GetCharIndexFromPosition(clickPos);
if (index < 0)
return;
int start = index; int start = index;
// find start of current line // find start of current line
while (--start > 0 && fullText[start - 1] != '\n'); while (--start > 0 && fullText[start - 1] != '\n');

Loading…
Cancel
Save