Mercurial > octave
changeset 27753:dcf6569cd973
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
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Thu, 28 Nov 2019 22:25:07 +0100 |
parents | e0cdaad8017d |
children | 0a9213395844 |
files | libgui/src/m-editor/octave-qscintilla.cc |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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); }); }