diff options
author | hut <hut@lavabit.com> | 2010-01-01 23:42:54 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-01-01 23:42:54 +0100 |
commit | e19f991553b17e9eb07124952682cd11a1ab1303 (patch) | |
tree | da291a891cd5f7928b5e811ccbcf8af9fa04834d /ranger/actions.py | |
parent | a56455bd596733236df37a88267489f7e17fb466 (diff) | |
download | ranger-e19f991553b17e9eb07124952682cd11a1ab1303.tar.gz |
actions: fixed cycling
Diffstat (limited to 'ranger/actions.py')
-rw-r--r-- | ranger/actions.py | 4 |
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) |