changeset 18629:a87bdd302b1b gui-release

set editor cursor on error line when debug_on_error is true (bug #41532) * input.cc (get_debug_input): If caller is defined, set curr_debug_line to the line number in the caller.
author John W. Eaton <jwe@octave.org>
date Wed, 26 Mar 2014 18:01:14 -0400
parents e7b347dcfc63
children 400f48e9e8cb
files libinterp/corefcn/input.cc
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/input.cc	Sat Mar 22 13:40:46 2014 -0700
+++ b/libinterp/corefcn/input.cc	Wed Mar 26 18:01:14 2014 -0400
@@ -510,8 +510,7 @@
 
   octave_user_code *caller = octave_call_stack::caller_user_code ();
   std::string nm;
-
-  int curr_debug_line = octave_call_stack::current_line ();
+  int curr_debug_line;
 
   bool have_file = false;
 
@@ -523,9 +522,11 @@
         nm = caller->name ();
       else
         have_file = true;
+
+      curr_debug_line = octave_call_stack::caller_user_code_line ();
     }
   else
-    curr_debug_line = -1;
+    curr_debug_line = octave_call_stack::current_line ();
 
   std::ostringstream buf;