diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 06f5da6c6..6daff3bcc 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -919,7 +919,7 @@ Repeat a given command. * +'command'+: The command to run, with optional args. ==== count -Multiplies with 'times' when given +Multiplies with 'times' when given. ==== note * This command does not split arguments after the last argument and handles quotes literally. diff --git a/qutebrowser/misc/utilcmds.py b/qutebrowser/misc/utilcmds.py index e867dd0b8..d108a56ac 100644 --- a/qutebrowser/misc/utilcmds.py +++ b/qutebrowser/misc/utilcmds.py @@ -81,8 +81,8 @@ def repeat(times: int, command, win_id, count=None): Args: times: How many times to repeat. command: The command to run, with optional args. + count: Multiplies with 'times' when given. """ - if count is not None: times *= count diff --git a/tests/end2end/features/utilcmds.feature b/tests/end2end/features/utilcmds.feature index fc397f506..fac335813 100644 --- a/tests/end2end/features/utilcmds.feature +++ b/tests/end2end/features/utilcmds.feature @@ -42,7 +42,7 @@ Feature: Miscellaneous utility commands exposed to the user. Then no crash should happen Scenario: :repeat with count - When I run :run-with-count 2 repeat 3 message-info "repeat-test 3" + When I run :repeat 3 message-info "repeat-test 3" with count 2 Then the message "repeat-test 3" should be shown And the message "repeat-test 3" should be shown And the message "repeat-test 3" should be shown