summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilipp Albrecht <philipp.albrecht@momox.biz>2021-11-26 15:47:05 +0100
committerPhilipp Albrecht <palbrecht@mailbox.org>2021-11-28 15:50:04 +0100
commitb900f1dd309cf7102d729316edb4c4aa7a5ed9de (patch)
treeeed6b07ee6954d633bdc0f9f7399e6a352adaeac /tests
parenta4213a4bb6245223ac2cb8bc112d3cf6ea086d24 (diff)
downloadqutebrowser-b900f1dd309cf7102d729316edb4c4aa7a5ed9de.tar.gz
qutebrowser-b900f1dd309cf7102d729316edb4c4aa7a5ed9de.zip
Make interpreting number keys as counts configurable
By default numbers are interpreted as counts for bindings. Making this behavior configurable allows for emacs-like bindings, where number keys are passed through.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/keyinput/test_basekeyparser.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/keyinput/test_basekeyparser.py b/tests/unit/keyinput/test_basekeyparser.py
index 30ee36301..84068bf47 100644
--- a/tests/unit/keyinput/test_basekeyparser.py
+++ b/tests/unit/keyinput/test_basekeyparser.py
@@ -346,3 +346,14 @@ def test_clear_keystring_empty(qtbot, keyparser):
keyparser._sequence = keyseq('')
with qtbot.assert_not_emitted(keyparser.keystring_updated):
keyparser.clear_keystring()
+
+
+def test_respect_config_when_matching_counts(keyparser, config_stub):
+ """Don't match counts if disabled in the config."""
+ config_stub.val.input.match_counts = False
+
+ info = keyutils.KeyInfo(Qt.Key_1, Qt.NoModifier)
+ keyparser.handle(info.to_event())
+
+ assert not keyparser._sequence
+ assert not keyparser._count