[Monodevelop-patches-list] r1244 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Thu Mar 25 16:08:26 EST 2004
Author: tberman
Date: 2004-03-25 16:08:26 -0500 (Thu, 25 Mar 2004)
New Revision: 1244
Modified:
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
Log:
fix bug with the first item in the list not being seen by the lookup
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-03-25 20:39:24 UTC (rev 1243)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-03-25 21:08:26 UTC (rev 1244)
@@ -1,5 +1,10 @@
2004-03-25 Todd Berman <tberman at sevenl.net>
+ * CodeCompletion/CompletionWindow.cs: fix bug where the first item
+ in the list was never being touched due to a for loop miscue.
+
+2004-03-25 Todd Berman <tberman at sevenl.net>
+
* Gui/SourceEditorView.cs: insert the character, *then* start the code
completion window, this results in the code completion window showing
up in the correct place (under the cursor, not under the previous char)
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs 2004-03-25 20:39:24 UTC (rev 1243)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs 2004-03-25 21:08:26 UTC (rev 1244)
@@ -108,9 +108,11 @@
int capitalizationIndex = -1;
string typedString = GetTypedString ();
+ Console.WriteLine (typedString);
TreeIter iter;
int i = 0;
- for (store.GetIterFirst (out iter); store.IterNext (out iter) == true; i++) {
+ store.GetIterFirst (out iter);
+ do {
string text = (string) store.GetValue (iter, 0);
if (text.ToUpper ().StartsWith (typedString.ToUpper ())) {
@@ -126,11 +128,12 @@
capitalizationIndex = currentCapitalizationIndex;
}
}
- }
-
+ i++;
+ } while (store.IterNext (out iter) == true);
+
if (lastSelected != -1) {
listView.Selection.UnselectAll ();
- TreePath path = new TreePath ("" + (lastSelected + 1));
+ TreePath path = new TreePath ("" + (lastSelected));
listView.Selection.SelectPath (path);
listView.SetCursor (path, complete_column, false);
listView.ScrollToCell (path, null, false, 0, 0);
More information about the Monodevelop-patches-list
mailing list