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

tfry at users.sf.net tfry at users.sf.net
Thu Oct 23 18:43:19 UTC 2014


Revision: 4942
          http://sourceforge.net/p/rkward/code/4942
Author:   tfry
Date:     2014-10-23 18:43:18 +0000 (Thu, 23 Oct 2014)
Log Message:
-----------
Somewhat dirty fix to make it impossible (again) to edit anything outside the current line in the console

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

Modified: trunk/rkward/rkward/rkconsole.cpp
===================================================================
--- trunk/rkward/rkward/rkconsole.cpp	2014-10-20 14:08:30 UTC (rev 4941)
+++ trunk/rkward/rkward/rkconsole.cpp	2014-10-23 18:43:18 UTC (rev 4942)
@@ -224,6 +224,13 @@
 
 	if (para < doc->lines () - 1 || pos < prefix.length ()) {	// not inside the last line?
 		if (!is_modifier_key) cursorAtTheEnd ();	// adjust position before interpreting non-modifier keystroke
+
+		// KDE 4.13.3 (may have started, earlier): Apparently, cursor adjustment does not take effect, immediately.
+		if (para < doc->lines () - 1 || pos < prefix.length ()) { // still not inside the last line?
+			// HACK ish workaround:
+			// qApp->postEvent (this, e); // not quite as easy to re-post, as event will be deleted
+			return true;	// at least prevent kate part form interpreting it
+		}
 	}
 
 	if (current_command) {
@@ -473,7 +480,7 @@
 		return RKMDIWindow::eventFilter (o, e);
 	}
 
-	if (e->type () == QEvent::KeyPress) {
+	if ((e->type () == QEvent::KeyPress) || (e->type () == QEvent::Shortcut)) {
 		QKeyEvent *k = (QKeyEvent *)e;
 		return (handleKeyPress (k));
 	} else if (e->type () == QEvent::MouseButtonPress) {





More information about the rkward-tracker mailing list