[Monodevelop-patches-list] r2441 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Sat Apr 9 21:31:04 EDT 2005
Author: jluke
Date: 2005-04-09 21:31:03 -0400 (Sat, 09 Apr 2005)
New Revision: 2441
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs
Log:
dont crash if provider == null,
fix for bug 74492
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-04-10 00:24:28 UTC (rev 2440)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-04-10 01:31:03 UTC (rev 2441)
@@ -1,5 +1,10 @@
2005-04-09 John Luke <john.luke at gmail.com>
+ * CodeCompletion/ListWindow.cs: dont crash
+ if the provider is null, fixes bug #74492
+
+2005-04-09 John Luke <john.luke at gmail.com>
+
* Services/SourceViewService.cs: catch XmlException
while restoring style/color prefs
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs 2005-04-10 00:24:28 UTC (rev 2440)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs 2005-04-10 01:31:03 UTC (rev 2441)
@@ -82,8 +82,7 @@
{
get
{
- int pos = list.Selection;
- pos ++;
+ int pos = list.Selection + 1;
if (provider.ItemCount > pos && provider.GetText (pos).ToLower ().StartsWith (PartialWord.ToLower ()) || !(provider.GetText (list.Selection).ToLower ().StartsWith (PartialWord.ToLower ())))
return false;
@@ -174,7 +173,7 @@
void UpdateWordSelection ()
{
string s = word.ToString ();
- int max = provider.ItemCount;
+ int max = (provider == null ? 0 : provider.ItemCount);
int bestMatch = -1;
for (int n=0; n<max; n++)
More information about the Monodevelop-patches-list
mailing list