[rkward-cvs] SF.net SVN: rkward: [1144] trunk/rkward/rkward/rkconsole.cpp
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Jan 14 17:27:35 UTC 2007
Revision: 1144
http://svn.sourceforge.net/rkward/?rev=1144&view=rev
Author: tfry
Date: 2007-01-14 09:27:35 -0800 (Sun, 14 Jan 2007)
Log Message:
-----------
Cleanup, and don't eat keystroke if outside last line, only adjust position first.
Does this fix the issue reported on the mailing list?
Modified Paths:
--------------
trunk/rkward/rkward/rkconsole.cpp
Modified: trunk/rkward/rkward/rkconsole.cpp
===================================================================
--- trunk/rkward/rkward/rkconsole.cpp 2007-01-14 17:19:48 UTC (rev 1143)
+++ trunk/rkward/rkward/rkconsole.cpp 2007-01-14 17:27:35 UTC (rev 1144)
@@ -176,15 +176,13 @@
bool RKConsole::handleKeyPress (QKeyEvent *e) {
- uint para=0; uint p=0;
- view->cursorPosition (¶, &p);
- uint pos = p;
-
-
- if (para < doc->numLines() - 1 || pos < prefix.length ()){
- int t=(int)pos;if(prefix.length()>pos) t=prefix.length();
- view->setCursorPosition (doc->numLines() -1, t);
- return(true);
+ uint para=0; uint pos=0;
+ view->cursorPosition (¶, &pos);
+
+ if (para < doc->numLines() - 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 (doc->numLines () -1, t);
}
if (current_command) {
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