about summary refs log tree commit diff stats
path: root/ranger/core/actions.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-26 03:34:08 +0200
committerhut <hut@lavabit.com>2010-05-26 03:34:08 +0200
commitb4f7187f0e05495c2cf902a367f14002d5e50821 (patch)
tree2fbfc200e9eed48a470e3e528a47b797667a7fde /ranger/core/actions.py
parent1e5adcd713e5c0ed960a924e49958af7aec34759 (diff)
downloadranger-b4f7187f0e05495c2cf902a367f14002d5e50821.tar.gz
defaults.keys: added key ^V for marking files in a specific direction
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r--ranger/core/actions.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 69fbf32f..14f862c7 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -273,6 +273,16 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 		if hasattr(self.ui, 'status'):
 			self.ui.status.need_redraw = True
 
+	def mark_in_direction(self, val=True, dirarg=None):
+		cwd = self.env.cwd
+		direction = Direction(dirarg)
+		pos, selected = direction.select(lst=cwd.files, current=cwd.pointer,
+				pagesize=self.env.termsize[0])
+		cwd.pointer = pos
+		cwd.correct_pointer()
+		for item in selected:
+			cwd.mark_item(item, val)
+
 	# --------------------------
 	# -- Searching
 	# --------------------------