diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2013-01-11 14:12:19 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2013-01-11 14:12:19 +0000 |
commit | 69f0cf8dc4fe860eb5ad9d6f71fbee9b611fca00 (patch) | |
tree | 520c20f9c24ba0610863aff7048f82372ee3ae42 /alot/settings | |
parent | a0cd61c13a2e934dc36565e2b9a6c7b08d1279c9 (diff) |
empty input queue as soon as
.. the current value cannot be prefix of any bound
keysequence. fixes #547
Diffstat (limited to 'alot/settings')
-rw-r--r-- | alot/settings/manager.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py index 422c8e62..9dfec358 100644 --- a/alot/settings/manager.py +++ b/alot/settings/manager.py @@ -309,6 +309,12 @@ class SettingsManager(object): return self.hooks.__dict__[key] return None + def get_mapped_input_keysequences(self, mode=None, prefix=u''): + candidates = self._bindings.scalars + if mode is not None: + candidates = candidates + self._bindings[mode].scalars + return [s for s in candidates if s.startswith(prefix)] + def get_keybinding(self, mode, key): """look up keybinding from `MODE-maps` sections |