diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2013-08-26 18:43:39 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2013-08-26 18:44:21 +0400 |
commit | 4c672afce9faa4a501558d31ae6cc9abedbfd185 (patch) | |
tree | 86fa21146a3a69580252272a28f1c7b7237d06e4 /main | |
parent | b5ba8d30d225b823c3a7d6ac05aa668a2e003d8d (diff) |
[SourceEditor] Added bounds check to the quick task panel.
Diffstat (limited to 'main')
m--------- | main/external/nrefactory | 0 | ||||
-rw-r--r-- | main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs | 10 |
2 files changed, 8 insertions, 2 deletions
diff --git a/main/external/nrefactory b/main/external/nrefactory -Subproject 85d1a1424b2266ace9edbe4c6628ce071d503cf +Subproject ca7c47265b3b16afe8d730f0dd1a38481f089d2 diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs index ebfe307f0b..f1f4b87df8 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs @@ -351,8 +351,14 @@ namespace MonoDevelop.SourceEditor.QuickTasks if (hoverOverIndicator) { parentStrip.GotoTask (parentStrip.SearchNextTask (currentHoverMode)); return base.OnButtonPressEvent (evnt); - } else if (hoverTask != null) { - TextEditor.Caret.Location = new DocumentLocation (hoverTask.Location.Line, Math.Max (DocumentLocation.MinColumn, hoverTask.Location.Column)); + } + + if (hoverTask != null) { + if (hoverTask.Location.IsEmpty) { + Console.WriteLine ("empty:"+ hoverTask.Description); + } + var loc = new DocumentLocation (Math.Max (DocumentLocation.MinLine, hoverTask.Location.Line), Math.Max (DocumentLocation.MinColumn, hoverTask.Location.Column)); + TextEditor.Caret.Location = loc; TextEditor.CenterToCaret (); TextEditor.StartCaretPulseAnimation (); TextEditor.GrabFocus (); |