Is there a way to temporarily suppress auto-repeating the last command when hitting return in an empty input line in debug mode? The following (simplified) procedure is used for sourcing a file and getting back to the input prompt when executing selected code in the editor:
std::string pending_input = command_editor::get_current_line (); interp.source_file (file); command_editor::replace_line (""); command_editor::set_initial_input (pending_input); command_editor::redisplay (); command_editor::interrupt_event_loop (); command_editor::accept_line ();
When in debug mode, this additionally repeats the last command. This could be, e.g., prevented by using
command_editor::replace_line ("#"); // line is not empty anymore
But this inserts “#” into the output and adds it to the history.