Mercurial > hg > octave-lyh
diff src/input.cc @ 7459:d3fe4d466bc2
don't inhibit drawnow in debug mode
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 08 Feb 2008 03:13:39 -0500 |
parents | 73036cdd855d |
children | 6070c3bd69c4 |
line wrap: on
line diff
--- a/src/input.cc +++ b/src/input.cc @@ -213,13 +213,11 @@ } static inline std::string -interactive_input (const std::string& s, bool debug = false, - bool force_readline = false) +interactive_input (const std::string& s, bool force_readline = false) { Vlast_prompt_time.stamp (); - if (! debug - && (Vdrawnow_requested && (interactive || forced_interactive))) + if (Vdrawnow_requested && (interactive || forced_interactive)) { feval ("drawnow"); @@ -658,9 +656,9 @@ octave_diary << prompt; - std::string input_buf = interactive_input (prompt.c_str (), debug, true); + std::string input_buf = interactive_input (prompt.c_str (), true); - if (! input_buf.empty ()) + if (! (error_state || input_buf.empty ())) { if (! input_from_startup_file) command_history::add (input_buf); @@ -740,7 +738,7 @@ // evaluating user input, extra error messages will not be // printed after we return. - error_state = 0; + reset_error_handler (); retval = octave_value_list (); @@ -805,7 +803,7 @@ while (1) { - std::string input_buf = interactive_input (prompt_string, false, true); + std::string input_buf = interactive_input (prompt_string, true); if (input_buf == "yes") return true;