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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Apr 21 11:04:29 UTC 2010


Revision: 2829
          http://rkward.svn.sourceforge.net/rkward/?rev=2829&view=rev
Author:   tfry
Date:     2010-04-21 11:04:29 +0000 (Wed, 21 Apr 2010)

Log Message:
-----------
Do not jump to last line, if only a modifier key was pressed. It might be part of a shortcut.

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

Modified: trunk/rkward/rkward/rkconsole.cpp
===================================================================
--- trunk/rkward/rkward/rkconsole.cpp	2010-04-21 10:57:20 UTC (rev 2828)
+++ trunk/rkward/rkward/rkconsole.cpp	2010-04-21 11:04:29 UTC (rev 2829)
@@ -204,9 +204,12 @@
 	command_was_piped = false;
 
 	if (para < doc->lines () - 1 || pos < prefix.length ()) {	// not inside the last line?
-		int t = (int) pos;					// adjust position before interpreting keystroke
-		if (prefix.length()>pos) t=prefix.length ();
-		view->setCursorPosition (KTextEditor::Cursor (doc->lines () -1, t));
+		int key = e->key ();
+		if ((key != Qt::Key_Shift) && (key != Qt::Key_Control) && (key != Qt::Key_Meta) && (key != Qt::Key_Alt)) {
+			int t = (int) pos;					// adjust position before interpreting non-modifier keystroke
+			if (prefix.length()>pos) t=prefix.length ();
+			view->setCursorPosition (KTextEditor::Cursor (doc->lines () -1, t));
+		}
 	}
 
 	if (view->selection ()) {


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