[rkward-cvs] SF.net SVN: rkward:[4080] trunk/rkward/rkward/rkconsole.cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Dec 7 18:31:27 UTC 2011


Revision: 4080
          http://rkward.svn.sourceforge.net/rkward/?rev=4080&view=rev
Author:   tfry
Date:     2011-12-07 18:31:26 +0000 (Wed, 07 Dec 2011)
Log Message:
-----------
EXPERIMENTAL: Allow text completion in the R Console

Modified Paths:
--------------
    trunk/rkward/rkward/rkconsole.cpp

Modified: trunk/rkward/rkward/rkconsole.cpp
===================================================================
--- trunk/rkward/rkward/rkconsole.cpp	2011-12-07 18:30:29 UTC (rev 4079)
+++ trunk/rkward/rkward/rkconsole.cpp	2011-12-07 18:31:26 UTC (rev 4080)
@@ -282,6 +282,15 @@
 		cursorAtTheEnd ();
 		return true;
 	} else if (key == Qt::Key_Enter || key == Qt::Key_Return) {
+		KTextEditor::CodeCompletionInterface *iface =
+		qobject_cast<KTextEditor::CodeCompletionInterface*> (view);
+		if (iface) {
+			if (iface->isCompletionActive ()) {
+				iface->forceCompletion ();
+				return true;
+			}
+		}
+
 		hinter->hideArgHint ();
 		addCommandToHistory (currentEditingLine ());
 		submitCommand ();

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list