summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-02-18 23:19:59 +0100
committerhut <hut@lavabit.com>2010-03-09 14:40:23 +0100
commit06152bdc5e20cbece35dd4709509b0bf024b428d (patch)
tree151d9a6d2ae99eb27f1ec007790bad1902faa451 /ranger
parentee4687c32e105a69d49c023e8f3a695b4b407ce2 (diff)
downloadranger-06152bdc5e20cbece35dd4709509b0bf024b428d.tar.gz
keyparser: fixes
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/keymap.py6
-rw-r--r--ranger/gui/ui.py7
2 files changed, 6 insertions, 7 deletions
diff --git a/ranger/container/keymap.py b/ranger/container/keymap.py
index dae8955a..e49da6ee 100644
--- a/ranger/container/keymap.py
+++ b/ranger/container/keymap.py
@@ -282,7 +282,7 @@ class KeyBuffer(object):
 				break
 		return self.command
 
-key_map = {
+special_keys = {
 	'dir': DIRKEY,
 	'any': ANYKEY,
 	'psv': PASSIVE_ACTION,
@@ -303,7 +303,7 @@ key_map = {
 	'tab': ord('\t'),
 }
 for char in ascii_lowercase:
-	key_map['c-' + char] = ord(char) - 96
+	special_keys['c-' + char] = ord(char) - 96
 
 def translate_keys(obj):
 	"""
@@ -327,7 +327,7 @@ def translate_keys(obj):
 					in_brackets = False
 					string = ''.join(bracket_content).lower()
 					try:
-						yield key_map[string]
+						yield special_keys[string]
 					except KeyError:
 						yield ord('<')
 						for c in bracket_content:
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index eb7c26fa..a972eca9 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -144,16 +144,15 @@ class UI(DisplayableContainer):
 
 		self.env.cmd = cmd
 
-		if hasattr(cmd, 'show_obj') and hasattr(cmd.show_obj, 'hint'):
-			if hasattr(self, 'hint'):
-				self.hint(cmd.show_obj.hint)
-		elif cmd.function:
+		if cmd.function:
 			try:
 				cmd.function(CommandArgs.from_widget(self))
 			except Exception as error:
 				self.fm.notify(error)
 			if kbuf.done:
 				kbuf.clear()
+		else:
+			kbuf.clear()
 
 	def get_next_key(self):
 		"""Waits for key input and returns the pressed key"""