diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index eb2f31575..1fed76c70 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -600,7 +600,7 @@ class CommandDispatcher: if perc is None and count is None: perc = 100 - elif perc is None: + elif count is not None: perc = count orientation = Qt.Horizontal if horizontal else Qt.Vertical diff --git a/tests/end2end/features/scroll.feature b/tests/end2end/features/scroll.feature index 676cd0890..50c22971a 100644 --- a/tests/end2end/features/scroll.feature +++ b/tests/end2end/features/scroll.feature @@ -190,6 +190,10 @@ Feature: Scrolling And I run :scroll-perc 20 Then no crash should happen + Scenario: :scroll-perc with count and argument + When I run :scroll-perc 0 with count 50 + Then the page should be scrolled vertically + ## :scroll-page Scenario: Scrolling down with :scroll-page