# HG changeset patch # User Torsten Lilge # Date 1574976307 -3600 # Node ID dcf6569cd9738f26288565a35504f52680c69f66 # Parent e0cdaad8017de3968a59165388b57bc2fb73477e prevent empty lines when using F9 for executing slected code (bug #57243) * octave-qscintilla.cc (context_run): reset rl erase empty lines back to false; (contextmenu_run): set rl erase empty line to true diff -r e0cdaad8017d -r dcf6569cd973 libgui/src/m-editor/octave-qscintilla.cc --- a/libgui/src/m-editor/octave-qscintilla.cc Thu Nov 28 19:15:06 2019 +0100 +++ b/libgui/src/m-editor/octave-qscintilla.cc Thu Nov 28 22:25:07 2019 +0100 @@ -339,7 +339,13 @@ void octave_qscintilla::context_run (void) { if (hasSelectedText ()) - contextmenu_run (true); + { + contextmenu_run (true); + + emit interpreter_event + ([] (interpreter&) + { command_editor::erase_empty_line (false); }); + } } void octave_qscintilla::get_global_textcursor_pos (QPoint *global_pos, @@ -952,12 +958,13 @@ emit ctx_menu_run_finished_signal (show_dbg_file, tmp_file, tmp_hist, tmp_script); + command_editor::erase_empty_line (true); command_editor::replace_line (""); command_editor::set_initial_input (pending_input); command_editor::redisplay (); command_editor::interrupt_event_loop (); command_editor::accept_line (); - + command_editor::erase_empty_line (true); }); }