Author: fejj
Date: 2007-03-07 13:53:26 -0500 (Wed, 07 Mar 2007)
New Revision: 73898
Modified:
trunk/monodevelop/Extras/CSharpBinding/ChangeLog
trunk/monodevelop/Extras/CSharpBinding/Gui/CSharpTextEditorExtension.cs
Log:
2007-03-07 Jeffrey Stedfast <[EMAIL PROTECTED]>
* Gui/CSharpTextEditorExtension.cs: Fixed a bug preventing
tab-completion from working by chaining the KeyPress() to the
parent.
Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-03-07 17:40:20 UTC
(rev 73897)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-03-07 18:53:26 UTC
(rev 73898)
@@ -1,5 +1,11 @@
2007-03-07 Jeffrey Stedfast <[EMAIL PROTECTED]>
+ * Gui/CSharpTextEditorExtension.cs: Fixed a bug preventing
+ tab-completion from working by chaining the KeyPress() to the
+ parent.
+
+2007-03-07 Jeffrey Stedfast <[EMAIL PROTECTED]>
+
* FormattingStrategy/CSharpIndentEngine.cs: Fixed bug #81065 by
looking at the last significant char on the line. Also now keeping
the last char typed as part of the state so as to avoid having to
Modified:
trunk/monodevelop/Extras/CSharpBinding/Gui/CSharpTextEditorExtension.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Gui/CSharpTextEditorExtension.cs
2007-03-07 17:40:20 UTC (rev 73897)
+++ trunk/monodevelop/Extras/CSharpBinding/Gui/CSharpTextEditorExtension.cs
2007-03-07 18:53:26 UTC (rev 73898)
@@ -75,6 +75,24 @@
return base.KeyPress (key, modifier);
if (!engine.IsInsideVerbatimString) {
+ if (base.KeyPress (key, modifier)) {
+ // parent implementation
handled this
+
+ // if chars have been inserted
but not
+ // LWSP, then the user probably
just
+ // tab-completed something -
we're done.
+ if (Editor.CursorPosition >
cursor &&
+ !Char.IsWhiteSpace
(Editor.GetCharAt (cursor)))
+ return true;
+
+ // parent implementation
inserted a tab or indent, ugh.
+
+ // Delete the tab/indent as it
may have been inserted in
+ // the middle of a method name
or something, which is
+ // totally bad.
+ Editor.DeleteText (cursor,
Editor.CursorPosition - cursor);
+ }
+
reindent = true;
insert = false;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches