about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-02-18 22:11:49 +0100
committerhut <hut@lavabit.com>2010-03-09 14:40:22 +0100
commit6ae8cb053b78effdeda1d9ba5966086e02befc9a (patch)
treee14e6762f6d98c3bf9eacfcd2053c945db31bdc3 /ranger
parentea3b13663ea3bbf42cd3472750ee7e00e9093ca4 (diff)
downloadranger-6ae8cb053b78effdeda1d9ba5966086e02befc9a.tar.gz
keyparser: swapped argument order in KeyMap.add()
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/keymap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/container/keymap.py b/ranger/container/keymap.py
index 23f26448..abc73d4d 100644
--- a/ranger/container/keymap.py
+++ b/ranger/container/keymap.py
@@ -78,10 +78,10 @@ class KeyMap(Tree):
 	def add(self, *args, **keywords):
 		if keywords:
 			return self.add_binding(*args, **keywords)
-		firstarg = args[0]
+		firstarg = args[-1]
 		if isfunction(firstarg):
 			keywords[FUNC] = firstarg
-			return self.add_binding(*args[1:], **keywords)
+			return self.add_binding(*args[:-1], **keywords)
 		def decorator_function(func):
 			keywords = {FUNC:func}
 			self.add(*args, **keywords)