summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorMaxim Novikov <mnovikov.work@gmail.com>2014-10-26 01:29:16 +0500
committerMaxim Novikov <mnovikov.work@gmail.com>2014-10-26 01:29:16 +0500
commit7968844c720d1f7e97851075a75efd3925f6a2ec (patch)
tree94bc9eacd5a156154c73d16ab72fee07a27e87ab /ranger
parentfc138baee9118076e8181096246a484f3611456c (diff)
downloadranger-7968844c720d1f7e97851075a75efd3925f6a2ec.tar.gz
Fixes #165 Map command should validate args count
Diffstat (limited to '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))