changeset 19936:26281bc8d23b

fix non functioning ctrl-c when function executed from editor (bug #44397) * octave-cmd.cc (octave_cmd_eval::execute): use command-editor if function name is a valid identifier and Fsource if not
author Torsten <ttl@justmail.de>
date Wed, 04 Mar 2015 21:01:28 +0100
parents ded81845c597
children 0019ad8590f3
files libgui/src/octave-cmd.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/octave-cmd.cc	Thu Feb 26 10:06:23 2015 +0100
+++ b/libgui/src/octave-cmd.cc	Wed Mar 04 21:01:28 2015 +0100
@@ -66,15 +66,15 @@
       // valid identifier: call as function with possibility to debug
       std::string path = _info.absolutePath ().toStdString ();
       if (octave_qt_link::file_in_path (file_path, path))
-        Feval (ovl (function_name.toStdString ()));
+        command_editor::replace_line (function_name.toStdString ());
     }
   else
     {
       // no valid identifier: use Fsource (), no debug possible
       Fsource (ovl (file_path));
+      command_editor::replace_line ("");
     }
 
-  command_editor::replace_line ("");
   command_editor::set_initial_input (pending_input);
   command_editor::redisplay ();