Debugger fixed about command interruption by another one
[scilab.git] / scilab / modules / ast / src / cpp / ast / run_SeqExp.hpp
index 9b1e9e9..8429c39 100644 (file)
@@ -65,8 +65,12 @@ void RunVisitorT<T>::visitprivate(const SeqExp  &e)
         // interrupt me to execute a prioritary command
         while (StaticRunner_isInterruptibleCommand() == 1 && StaticRunner_isRunnerAvailable() == 1)
         {
+            // save the origin of the actual running command
+            command_origin_t origin = StaticRunner_getCurrentCommandOrigin();
             StaticRunner_launch();
             StaticRunner_setInterruptibleCommand(1);
+            // restore the origin of the actual running command
+            StaticRunner_setCurrentCommandOrigin(origin);
         }
 
         if (file)