From f025394e047a8579a249847b67825c5581a120b2 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Thu, 19 May 2016 20:42:22 -0400 Subject: [PATCH] Set maxsplit=2 for :hint. This supports things like :hint all spawn -v echo as '-v echo' will be passed as a single unit to spawn rather than -v being interpreted as a flag for :hint. Resolves #797. Note that, while `:hint --rapid all spawn -v` echo works, `:hint all --rapid spawn -v echo` does not (this did not work before either). --- qutebrowser/browser/hints.py | 2 +- tests/integration/features/hints.feature | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 6a09274a6..cff7ce724 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -779,7 +779,7 @@ class HintManager(QObject): webview.openurl(url) @cmdutils.register(instance='hintmanager', scope='tab', name='hint', - star_args_optional=True) + star_args_optional=True, maxsplit=2) @cmdutils.argument('win_id', win_id=True) def start(self, rapid=False, group=webelem.Group.all, target=Target.normal, *args, win_id): diff --git a/tests/integration/features/hints.feature b/tests/integration/features/hints.feature index a6be75abc..f8a77212f 100644 --- a/tests/integration/features/hints.feature +++ b/tests/integration/features/hints.feature @@ -50,12 +50,11 @@ Feature: Using hints 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 And I run :hint all spawn -v echo And I run :follow-hint a - Then the message "Command exited successfully" should be shown + Then the message "Command exited successfully." should be shown Scenario: Yanking to primary selection without it being supported (#1336) When selection is not supported