summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2014-10-26 05:55:14 +0100
committerhut <hut@lepus.uberspace.de>2014-10-26 05:55:14 +0100
commit4e73fe41eee4c5eb3fb93c735d57565a0dd2a7c4 (patch)
tree32071520f881a57b49eacec82e0278ebebae15eb
parent9cee6325c3013fe100d8d7209aad419d7825e0b7 (diff)
parent7968844c720d1f7e97851075a75efd3925f6a2ec (diff)
downloadranger-4e73fe41eee4c5eb3fb93c735d57565a0dd2a7c4.tar.gz
Merge branch 'map-should-check-args-count' of https://github.com/m-novikov/ranger
-rw-r--r--ranger/config/commands.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 380d4eef..51bff937 100644
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -935,6 +935,9 @@ class map_(Command):
     resolve_macros = False
 
     def execute(self):
+        if not self.arg(1) or not self.arg(2):
+            return self.fm.notify("Not enough arguments", bad=True)
+
         self.fm.ui.keymaps.bind(self.context, self.arg(1), self.rest(2))