summary refs log tree commit diff stats
path: root/ranger/actions.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-01 23:42:54 +0100
committerhut <hut@lavabit.com>2010-01-01 23:42:54 +0100
commite19f991553b17e9eb07124952682cd11a1ab1303 (patch)
treeda291a891cd5f7928b5e811ccbcf8af9fa04834d /ranger/actions.py
parenta56455bd596733236df37a88267489f7e17fb466 (diff)
downloadranger-e19f991553b17e9eb07124952682cd11a1ab1303.tar.gz
actions: fixed cycling
Diffstat (limited to 'ranger/actions.py')
-rw-r--r--ranger/actions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/actions.py b/ranger/actions.py
index 0d8472cd..9b877e71 100644
--- a/ranger/actions.py
+++ b/ranger/actions.py
@@ -13,6 +13,7 @@ class Actions(EnvironmentAware, SettingsAware):
 	search_forward = False
 
 	def search(self, order=None, forward=True):
+		original_order = order
 		if self.search_forward:
 			direction = bool(forward)
 		else:
@@ -39,7 +40,7 @@ class Actions(EnvironmentAware, SettingsAware):
 
 		elif order in ('size', 'mimetype', 'ctime'):
 			pwd = self.env.pwd
-			if not pwd.cycle_list:
+			if original_order is not None:
 				lst = list(pwd.files)
 				if order == 'size':
 					fnc = lambda item: item.size
@@ -49,6 +50,7 @@ class Actions(EnvironmentAware, SettingsAware):
 					fnc = lambda item: -int(item.stat and item.stat.st_ctime)
 				lst.sort(key=fnc)
 				pwd.set_cycle_list(lst)
+				return pwd.cycle(forward=None)
 
 			return pwd.cycle(forward=forward)
 
itle='author Anselm R. Garbe <arg@suckless.org> 2007-01-05 21:56:57 +0100 committer Anselm R. Garbe <arg@suckless.org> 2007-01-05 21:56:57 +0100 prevent pop() if first sel == nexttiled(clients)' href='/acidbong/suckless/dwm/commit/config.mk?h=3.9&id=e9cfae7aba1c8eafd827854705bf0d11d2de2dfb'>e9cfae7 ^
d7e1708 ^
71fd06f ^




95766d6 ^
1076f2b
95766d6 ^
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