# HG changeset patch # User Markus Mützel # Date 1627813123 -7200 # Node ID fb0436a0c126e2428221d662360fcb1c91f2923c # Parent b39203a44db2614b1965d1c9b4f24e841c8f5d9a# Parent 116dbaba5a74d79892b8f7d97d0d28a8a0686a7d maint: Merge stable to default. diff -r b39203a44db2 -r fb0436a0c126 libgui/src/external-editor-interface.cc --- 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)); diff -r b39203a44db2 -r fb0436a0c126 libgui/src/m-editor/file-editor.cc --- 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 (); diff -r b39203a44db2 -r fb0436a0c126 libgui/src/m-editor/octave-qscintilla.h