summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-12-23 12:38:07 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-12-23 12:38:07 +0100
commit7f87ecc1c1fb9decc2d4cfef874563acf10670de (patch)
treeb751aa2867843adc726626004cbb969e26167b0f
parent2ebcbb63c401921b1afa2ad763d0b48baf54bad3 (diff)
downloadqutebrowser-7f87ecc1c1fb9decc2d4cfef874563acf10670de.tar.gz
qutebrowser-7f87ecc1c1fb9decc2d4cfef874563acf10670de.zip
Interpret --mode for :bind without key
-rw-r--r--doc/changelog.asciidoc2
-rw-r--r--qutebrowser/config/configcommands.py5
-rw-r--r--qutebrowser/html/bindings.html2
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 %}
<header><h1>{{ title }}</h1></header>
{% for mode, binding in bindings.items() %}
-<h2>{{ mode | capitalize }} mode</h2>
+<h2 id="{{ mode }}">{{ mode | capitalize }} mode</h2>
<table>
<tr>
<th>Key</th>