about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2013-08-17 13:54:30 +0200
committerhut <hut@lepus.uberspace.de>2013-08-17 13:54:30 +0200
commitf0919e87cad6d071cbae74813bd7c892224e8b99 (patch)
tree13a2ab6d52349ce5bacfe733beb79625d2fdceb4
parent8a098da9f1e1fa62ddb6f629e50526686d3c1bbb (diff)
downloadranger-f0919e87cad6d071cbae74813bd7c892224e8b99.tar.gz
core.actions: better numerical argument to "mark_files"
-rw-r--r--ranger/core/actions.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index d493da48..2ba696ac 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -538,7 +538,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
         except:
             pass
 
-    def mark_files(self, all=False, toggle=False, val=None, movedown=None, narg=1):
+    def mark_files(self, all=False, toggle=False, val=None, movedown=None, narg=None):
         """A wrapper for the directory.mark_xyz functions.
 
         Arguments:
@@ -561,6 +561,11 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
         if val is None and toggle is False:
             return
 
+        if narg == None:
+            narg = 1
+        else:
+            all = False
+
         if all:
             if toggle:
                 cwd.toggle_all_marks()