# HG changeset patch # User Lachlan Andrew # Date 1456440763 -39600 # Node ID 7ba48ff6ce83f549fdf2293ae9d085ee5fe9f830 # Parent 38c0c1f5cf57969bd226958c0a3eceb5f5b9209f Record correct line number with "until" command (bug #43249) * pt-eval.cc (visit_do_until_command): set_location just before testing until condition. diff -r 38c0c1f5cf57 -r 7ba48ff6ce83 libinterp/parse-tree/pt-eval.cc --- a/libinterp/parse-tree/pt-eval.cc Thu Mar 24 18:56:33 2016 +0100 +++ b/libinterp/parse-tree/pt-eval.cc Fri Feb 26 09:52:43 2016 +1100 @@ -1067,6 +1067,8 @@ in_loop_command = true; tree_expression *expr = cmd.condition (); + int until_line = cmd.line (); + int until_column = cmd.column (); if (! expr) panic_impossible (); @@ -1084,6 +1086,8 @@ if (debug_mode) do_breakpoint (cmd.is_breakpoint (true)); + octave_call_stack::set_location (until_line, until_column); + if (expr->is_logically_true ("do-until")) break; }