[rkward-cvs] SF.net SVN: rkward: [994] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Tue Dec 5 15:12:30 UTC 2006
Revision: 994
http://svn.sourceforge.net/rkward/?rev=994&view=rev
Author: tfry
Date: 2006-12-05 07:12:30 -0800 (Tue, 05 Dec 2006)
Log Message:
-----------
In the console, advance cursor to the next line right after pressing enter (makes it easier to see, when a command has been submitted
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/rkconsole.cpp
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2006-12-05 15:11:44 UTC (rev 993)
+++ trunk/rkward/ChangeLog 2006-12-05 15:12:30 UTC (rev 994)
@@ -1,4 +1,6 @@
-- Script editor commands are piped through the console (by default; this is configurable)
+- in console, make cursor go to empty next line after pressing enter, before there is output (more like in the real console)
+- add "run selection" option to command log
+- script editor commands are piped through the console (by default; this is configurable)
- (Cleanups: scatterplot plugin moved to plots, use "<-" instead of "=")
--- Version 0.4.2 - Dec-04-2006
Modified: trunk/rkward/rkward/rkconsole.cpp
===================================================================
--- trunk/rkward/rkward/rkconsole.cpp 2006-12-05 15:11:44 UTC (rev 993)
+++ trunk/rkward/rkward/rkconsole.cpp 2006-12-05 15:12:30 UTC (rev 994)
@@ -394,6 +394,7 @@
if (!currentCommand ().isEmpty ()) {
current_command = new RCommand (c, RCommand::User | RCommand::Console, QString::null, this);
RKGlobals::rInterface ()->issueCommand (current_command);
+ doc->insertText (doc->numLines () - 1, editInterface (doc)->lineLength (doc->numLines () -1), "\n");
interrupt_command_action->setEnabled (true);
} else {
tryNextInBatch ();
@@ -433,6 +434,7 @@
incomplete_command = QString::null;
}
+ if (output_continuation) doc->insertLine (doc->numLines (), "");
output_continuation = false;
commands_history_position = commands_history.constEnd ();
tryNextInBatch ();
@@ -444,9 +446,9 @@
// TODO: handle different types of output, once we can differentiate between them
// insertAt (output->output, doc->numLines()-1, paragraphLength (doc->numLines() - 1));
if (output_continuation) {
- editInterface (doc)->insertText (doc->numLines () -1, editInterface (doc)->lineLength (doc->numLines () -1), output->output);
+ editInterface (doc)->insertText (doc->numLines () -1, editInterface (doc)->lineLength (doc->numLines () -1), output->output);
} else {
- editInterface (doc)->insertText (doc->numLines (), 0, output->output);
+ editInterface (doc)->insertText (doc->numLines () -1, 0, output->output);
}
if (RKSettingsModuleConsole::maxConsoleLines ()) {
@@ -483,7 +485,7 @@
}
setUpdatesEnabled (true);
}
- editInterface(doc)->insertLine(doc->numLines(), prefix); // somehow, it seems to be safer to do this after removing superflous lines, than before
+ editInterface(doc)->insertText (doc->numLines ()-1, 0, prefix); // somehow, it seems to be safer to do this after removing superflous lines, than before
cursorAtTheEnd ();
}
@@ -513,6 +515,7 @@
void RKConsole::clear () {
RK_TRACE (APP);
doc->clear ();
+ doc->insertLine (doc->numLines (), "");
tryNextInBatch ();
// need this HACK to remove empty line at start
selectionInterface (doc)->setSelection (0, 0, 1, 0);
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