[MonoDevelop] [patch] code completion

Grzegorz Sobanski silk at boktor.net
Wed May 24 09:35:31 EDT 2006


I suggest a little patch to code completion code.
What irritates me when using MD and ctrl+space
is that first match automatically completes what I have typed.
Worse it often overwrites what I have typed, if no match was found with
typed prefix.
Considering drawbacks of finding proper completions I suggest disabling
this automatic choice of first match. It does not slow down coding but 
acts a lot more like expected.

I suppose after NRefactor integration it will sooner or later behave
differently, but for now this change is IMO good.


Grzegorz "Silk" Sobański                        silk (at) boktor.net
Dwie tajemnice gwarantujące sukces:                http://boktor.net
   1. Nikomu nie mów wszystkiego
-------------- next part --------------
Index: Core/src/MonoDevelop.Projects.Gui/MonoDevelop.Projects.Gui.Completion/CompletionListWindow.cs
--- Core/src/MonoDevelop.Projects.Gui/MonoDevelop.Projects.Gui.Completion/CompletionListWindow.cs	(wersja 61045)
+++ Core/src/MonoDevelop.Projects.Gui/MonoDevelop.Projects.Gui.Completion/CompletionListWindow.cs	(kopia robocza)
@@ -53,12 +53,10 @@
 				//if there is only one matching result we take it by default
 				if (wnd.IsUniqueMatch)
+					wnd.UpdateWord ();
 					wnd.Hide ();
-				wnd.UpdateWord ();
-				wnd.PartialWord = wnd.CompleteWord;
 			} catch (Exception ex) {
 				Console.WriteLine (ex);
Index: Core/ChangeLog
--- Core/ChangeLog	(wersja 61045)
+++ Core/ChangeLog	(kopia robocza)
@@ -1,3 +1,9 @@
+2006-05-24  Grzegorz Sobański  <silk at boktor.net>
+	* src/MonoDevelop.Projects.Gui/MonoDevelop.Projects.Gui.Completion/CompletionListWindow.cs:
+	    alter code completion - do not auto-insert first match - it too often
+	    destroys what user has written.
 2006-03-16  Jacob Ils? Christensen  <jacobilsoe at gmail.com>
 	* src/Makefile.am: Changed build order.

More information about the Monodevelop-list mailing list