summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/actions.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/ranger/actions.py b/ranger/actions.py
index d00997c8..095dc24b 100644
--- a/ranger/actions.py
+++ b/ranger/actions.py
@@ -349,7 +349,7 @@ class Actions(EnvironmentAware, SettingsAware):
 		if hasattr(self.ui, 'notify'):
 			self.ui.notify(text, duration=duration, bad=bad)
 
-	def mark(self, all=False, toggle=False, val=None, movedown=None):
+	def mark(self, all=False, toggle=False, val=None, movedown=None, narg=1):
 		"""
 		A wrapper for the directory.mark_xyz functions.
 
@@ -376,15 +376,16 @@ class Actions(EnvironmentAware, SettingsAware):
 			else:
 				pwd.mark_all(val)
 		else:
-			item = self.env.cf
-			if item is not None:
-				if toggle:
-					pwd.toggle_mark(item)
-				else:
-					pwd.mark_item(item, val)
+			for i in range(pwd.pointer, min(pwd.pointer + narg, len(pwd))):
+				item = pwd.files[i]
+				if item is not None:
+					if toggle:
+						pwd.toggle_mark(item)
+					else:
+						pwd.mark_item(item, val)
 
 		if movedown:
-			self.move_pointer(relative=1)
+			self.move_pointer(relative=narg)
 
 		if hasattr(self.ui, 'redraw_main_column'):
 			self.ui.redraw_main_column()
@lavabit.com> 2010-01-14 02:59:14 +0100 committer hut <hut@lavabit.com> 2010-01-14 02:59:14 +0100 1.0.2!' href='/akspecs/ranger/commit/doc/pydoc/ranger.container.bookmarks.html?h=v1.1.1&id=4e9450f955e763a4d301645ab11201834d8a0ccc'>4e9450f9 ^
f07bb12f ^
f07bb12f ^








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122