Mercurial > octave
comparison 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 |
comparison
equal
deleted
inserted
replaced
29422:8b9e3f0bd06f | 29424:c003947a98a7 |
---|---|
57 | 57 |
58 // replace macros | 58 // replace macros |
59 editor.replace ("%f", file); | 59 editor.replace ("%f", file); |
60 editor.replace ("%l", QString::number (line)); | 60 editor.replace ("%l", QString::number (line)); |
61 | 61 |
62 QStringList arguments; | 62 QStringList arguments = editor.split (QRegExp("\\s+")); |
63 editor = arguments.takeFirst (); | |
63 | 64 |
64 // start the process and check for success | 65 // start the process and check for success |
65 bool started_ok = QProcess::startDetached (editor, arguments); | 66 bool started_ok = QProcess::startDetached (editor, arguments); |
66 | 67 |
67 if (started_ok != true) | 68 if (started_ok != true) |