From 5e0fa6810b8162e15fd506a255c4d2f52d9df82e Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 16 Apr 2010 17:30:03 +0200 Subject: container.keybuffer: bugfix --- ranger/container/keybuffer.py | 5 +++-- 1 file 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: -- cgit 1.4.1-2-gfad0