changeset 17669:b7670c05731b

*octave-qscintilla.cc(contextmenu_run): split selection into single commands
author Torsten <ttl@justmail.de>
date Wed, 16 Oct 2013 23:22:50 +0200
parents 171e958d672e
children ea9df126c9a5
files libgui/src/m-editor/octave-qscintilla.cc
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/octave-qscintilla.cc	Wed Oct 16 12:16:08 2013 -0700
+++ b/libgui/src/m-editor/octave-qscintilla.cc	Wed Oct 16 23:22:50 2013 +0200
@@ -176,8 +176,9 @@
 void
 octave_qscintilla::contextmenu_run (bool)
 {
-  QString command = selectedText ();
-  emit execute_command_in_terminal_signal (command);
+  QStringList commands = selectedText ().split (QRegExp("[\r\n]"),QString::SkipEmptyParts);
+  for (int i = 0; i < commands.size (); i++ )
+    emit execute_command_in_terminal_signal (commands.at (i));
 }
 
 #endif