From 7f87ecc1c1fb9decc2d4cfef874563acf10670de Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 23 Dec 2021 12:38:07 +0100 Subject: Interpret --mode for :bind without key --- doc/changelog.asciidoc | 2 ++ qutebrowser/config/configcommands.py | 5 ++++- qutebrowser/html/bindings.html | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index d4b59081f..6b2746c96 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -37,6 +37,8 @@ Changed fixed values. - The default `hint.selectors` now match more ARIA roles (`tab`, `checkbox`, `menuitem`, `menuitemcheckbox` and `menuitemradio`). +- Using e.g. `:bind --mode=passthrough` now scrolls to the passthrough section + on the `qute://bindings` page. Added ~~~~~ diff --git a/qutebrowser/config/configcommands.py b/qutebrowser/config/configcommands.py index 417ffce00..407c74214 100644 --- a/qutebrowser/config/configcommands.py +++ b/qutebrowser/config/configcommands.py @@ -151,9 +151,12 @@ class ConfigCommands: default: If given, restore a default binding. """ if key is None: + url = QUrl('qute://bindings') + if mode != "normal": + url.setFragment(mode) tabbed_browser = objreg.get('tabbed-browser', scope='window', window=win_id) - tabbed_browser.load_url(QUrl('qute://bindings'), newtab=True) + tabbed_browser.load_url(url, newtab=True) return seq = self._parse_key(key) diff --git a/qutebrowser/html/bindings.html b/qutebrowser/html/bindings.html index fe6913402..7bc441cbd 100644 --- a/qutebrowser/html/bindings.html +++ b/qutebrowser/html/bindings.html @@ -10,7 +10,7 @@ th { text-align:left; } {% block content %}

{{ title }}

{% for mode, binding in bindings.items() %} -

{{ mode | capitalize }} mode

+

{{ mode | capitalize }} mode

-- cgit v1.2.3-54-g00ecf
Key