changeset 29424:c003947a98a7 stable

fix calling external editor (bug #60198) * external-editor-interface.cc (call_custom_editor): separate program name and arguments
author Torsten Lilge <ttl-octave@mailbox.org>
date Wed, 10 Mar 2021 07:10:53 +0100
parents 8b9e3f0bd06f
children 11a1e69e0035 d07e1eeceead
files libgui/src/external-editor-interface.cc
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/external-editor-interface.cc	Sun Mar 07 23:28:25 2021 -0500
+++ b/libgui/src/external-editor-interface.cc	Wed Mar 10 07:10:53 2021 +0100
@@ -59,7 +59,8 @@
     editor.replace ("%f", file);
     editor.replace ("%l", QString::number (line));
 
-    QStringList arguments;
+    QStringList arguments = editor.split (QRegExp("\\s+"));
+    editor = arguments.takeFirst ();
 
     // start the process and check for success
     bool started_ok = QProcess::startDetached (editor, arguments);