Mercurial > octave
changeset 29935:fb0436a0c126
maint: Merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 01 Aug 2021 12:18:43 +0200 |
parents | b39203a44db2 (current diff) 116dbaba5a74 (diff) |
children | 79c6a29dd384 |
files | libgui/src/m-editor/file-editor.cc libgui/src/m-editor/octave-qscintilla.h |
diffstat | 2 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/external-editor-interface.cc Fri Jul 30 12:05:48 2021 -0700 +++ b/libgui/src/external-editor-interface.cc Sun Aug 01 12:18:43 2021 +0200 @@ -46,15 +46,13 @@ bool external_editor_interface::call_custom_editor (const QString& file, int line) { - if (line > -1) // check for a specific line (debugging) - return true; // yes: do not open a file in external editor - else - line = 0; // no: start external editor at beginning of file - QString editor = external_editor (); if (editor.isEmpty ()) return true; + if (line < 0) + line = 0; + // replace macros editor.replace ("%f", file); editor.replace ("%l", QString::number (line));
--- a/libgui/src/m-editor/file-editor.cc Fri Jul 30 12:05:48 2021 -0700 +++ b/libgui/src/m-editor/file-editor.cc Sun Aug 01 12:18:43 2021 +0200 @@ -1542,11 +1542,19 @@ bool breakpoint_marker, bool insert, const QString& cond, int index) { - if (call_custom_editor (openFileName, line)) - return; // custom editor called - resource_manager& rmgr = m_octave_qobj.get_resource_manager (); gui_settings *settings = rmgr.get_settings (); + + if (settings->value (global_use_custom_editor).toBool ()) + { + // Custom editor + if (debug_pointer || breakpoint_marker) + return; // Do not call custom editor during debugging + + if (call_custom_editor (openFileName, line)) + return; // Custom editor called + } + bool show_dbg_file = settings->value (ed_show_dbg_file).toBool ();