diff libgui/src/external-editor-interface.cc @ 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 0a5b15007766
children 116dbaba5a74
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);