diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 69252f106..6a09274a6 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -36,7 +36,6 @@ from qutebrowser.keyinput import modeman, modeparsers from qutebrowser.browser import webelem from qutebrowser.commands import userscripts, cmdexc, cmdutils, runners from qutebrowser.utils import usertypes, log, qtutils, message, objreg, utils -from qutebrowser.misc import guiprocess ElemTuple = collections.namedtuple('ElemTuple', ['elem', 'label']) @@ -625,9 +624,8 @@ class HintManager(QObject): """ urlstr = url.toString(QUrl.FullyEncoded | QUrl.RemovePassword) args = context.get_args(urlstr) - cmd, *args = args - proc = guiprocess.GUIProcess(self._win_id, what='command', parent=self) - proc.start(cmd, args) + commandrunner = runners.CommandRunner(self._win_id) + commandrunner.run_safely('spawn ' + ' '.join(args)) def _resolve_url(self, elem, baseurl): """Resolve a URL and check if we want to keep it. diff --git a/tests/integration/features/hints.feature b/tests/integration/features/hints.feature index 4d4519fdd..a6be75abc 100644 --- a/tests/integration/features/hints.feature +++ b/tests/integration/features/hints.feature @@ -44,6 +44,12 @@ Feature: Using hints And I run :fake-key -g Then no crash should happen + Scenario: Using :hint spawn with flags and -- (issue 797) + When I open data/hints/link.html + And I run :hint -- all spawn -v echo + And I run :follow-hint a + Then the message "Command exited successfully." should be shown + @xfail Scenario: Using :hint spawn with flags (issue 797) When I open data/hints/html/simple.html