Mercurial > octave
diff libinterp/parse-tree/oct-parse.yy @ 28146:27c0b26e5a9f
maint: merge stable to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 08 Mar 2020 17:54:55 -0400 |
parents | 376ca9022b7e 9e983eb1749d |
children | a04cb1364af4 |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.yy Fri Feb 28 07:08:14 2020 +0100 +++ b/libinterp/parse-tree/oct-parse.yy Sun Mar 08 17:54:55 2020 -0400 @@ -4561,6 +4561,13 @@ if (m_lexer.m_reading_fcn_file || m_lexer.m_reading_script_file || m_lexer.m_reading_classdef_file) curr_line = get_file_line (m_lexer.m_fcn_file_full_name, err_line); + else + curr_line = m_lexer.m_current_input_line; + + // Adjust the error column for display because it is 1-based in the + // lexer for easier reporting and it has already been advanced to + // one past the end of the most recently read token. + err_col -= 2; if (! curr_line.empty ()) {