[rkward-cvs] SF.net SVN: rkward: [1145] trunk/rkward/rkward/rkconsole.cpp
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Jan 14 17:45:02 UTC 2007
Revision: 1145
http://svn.sourceforge.net/rkward/?rev=1145&view=rev
Author: tfry
Date: 2007-01-14 09:45:02 -0800 (Sun, 14 Jan 2007)
Log Message:
-----------
The check removed in 1143 is needed, indeed.
Reinstated with some comments, a beep, and without the dead code for copying
Modified Paths:
--------------
trunk/rkward/rkward/rkconsole.cpp
Modified: trunk/rkward/rkward/rkconsole.cpp
===================================================================
--- trunk/rkward/rkward/rkconsole.cpp 2007-01-14 17:27:35 UTC (rev 1144)
+++ trunk/rkward/rkward/rkconsole.cpp 2007-01-14 17:45:02 UTC (rev 1145)
@@ -184,7 +184,16 @@
if (prefix.length()>pos) t=prefix.length ();
view->setCursorPosition (doc->numLines () -1, t);
}
-
+
+ if (hasSelectedText () && (selectionInterfaceExt(doc)->selStartCol () < (int) prefix.length () || selectionInterfaceExt (doc)->selStartLine () < (int) doc->numLines () -1)) { // There is a selection outside the command line
+ // Eat the key and beep (unless it's just a modifier key). Otherwise it might overwrite or delete the selection
+ if (e->state () == e->stateAfter ()) {
+ KApplication::kApplication ()->beep ();
+ e->ignore ();
+ }
+ return true;
+ }
+
if (current_command) {
e->ignore ();
return true;
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