about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2013-08-17 13:57:27 +0200
committerhut <hut@lepus.uberspace.de>2013-08-17 13:57:27 +0200
commit82836b1f259ef5d2545a04e54d9ec6a1854b3dbd (patch)
tree30e1212c7569d7567df9bb2036984e1528d9111b
parentf0919e87cad6d071cbae74813bd7c892224e8b99 (diff)
downloadranger-82836b1f259ef5d2545a04e54d9ec6a1854b3dbd.tar.gz
core.actions: add numerical argument to toggle_visual_mode
-rw-r--r--ranger/core/actions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 2ba696ac..67223258 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -97,9 +97,11 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
             return value.split(',')
         raise ValueError("Invalid value `%s' for option `%s'!" % (name, value))
 
-    def toggle_visual_mode(self, reverse=False):
+    def toggle_visual_mode(self, reverse=False, narg=None):
         if self.mode == 'normal':
             self._visual_reverse = reverse
+            if narg != None:
+                self.mark_files(val=not reverse, narg=narg)
             self.change_mode('visual')
         else:
             self.change_mode('normal')