diff options
author | hut <hut@lavabit.com> | 2010-04-16 17:30:03 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-04-16 17:30:03 +0200 |
commit | 5e0fa6810b8162e15fd506a255c4d2f52d9df82e (patch) | |
tree | ea4b3b85303bdfa635c3f1c37f783ca09cb5afc6 /ranger | |
parent | 60c5b88fc661e3fb87a290cb66a04523f9bf6c36 (diff) | |
download | ranger-5e0fa6810b8162e15fd506a255c4d2f52d9df82e.tar.gz |
container.keybuffer: bugfix
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/container/keybuffer.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/container/keybuffer.py b/ranger/container/keybuffer.py index ce391de4..970bbdb9 100644 --- a/ranger/container/keybuffer.py +++ b/ranger/container/keybuffer.py @@ -21,6 +21,7 @@ from ranger.ext.keybinding_parser import parse_keybinding, \ from ranger.container.keymap import Binding, KeyMap # mainly for assertions MAX_ALIAS_RECURSION = 20 +digitlist = [ord(n) for n in digits] class KeyBuffer(object): """The evaluator and storage for pressed keys""" @@ -92,7 +93,7 @@ class KeyBuffer(object): tree = self.tree_pointer else: tree = self.dir_tree_pointer - if chr(key) in digits and ANYKEY not in tree: + if key in digitlist and ANYKEY not in tree: attr = self.eval_command and 'quant' or 'direction_quant' if getattr(self, attr) is None: setattr(self, attr, 0) @@ -111,7 +112,7 @@ class KeyBuffer(object): return None except KeyError: try: - chr(key) in digits or self.direction_keys._tree[key] + key in digitlist or self.direction_keys._tree[key] self.tree_pointer = self.tree_pointer[DIRKEY] except KeyError: try: |