Mercurial > octave
diff libinterp/corefcn/input.h @ 28972:a00eca5d6cbe stable
allow auto repeat of debug commands to be disabled
* input.h, input.cc (input_system::m_auto_repeat_debug_command):
New member variable.
(input_system::auto_repeat_debug_command): New functions.
(Fauto_repeat_debug_command): New function.
* debug.txi: Document new function.
* NEWS: Mention new function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 21 Oct 2020 14:45:40 -0400 |
parents | f0a3f4527ba6 |
children | fdb7c296505a 0a5b15007766 |
line wrap: on
line diff
--- a/libinterp/corefcn/input.h Tue Oct 20 13:27:38 2020 -0400 +++ b/libinterp/corefcn/input.h Wed Oct 21 14:45:40 2020 -0400 @@ -147,6 +147,21 @@ void set_mfile_encoding (const std::string& s) { m_mfile_encoding = s; } + octave_value + auto_repeat_debug_command (const octave_value_list& args, int nargout); + + bool auto_repeat_debug_command (void) const + { + return m_auto_repeat_debug_command; + } + + bool auto_repeat_debug_command (bool val) + { + bool old_val = m_auto_repeat_debug_command; + m_auto_repeat_debug_command = val; + return old_val; + } + bool yes_or_no (const std::string& prompt); std::string interactive_input (const std::string& s, bool& eof); @@ -184,6 +199,9 @@ // Codepage which is used to read .m files std::string m_mfile_encoding; + // TRUE means repeat last debug command if the user just types RET. + bool m_auto_repeat_debug_command; + // If we are in debugging mode, this is the last command entered, // so that we can repeat the previous command if the user just // types RET.