about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-28 11:30:13 +0200
committerhut <hut@lavabit.com>2010-05-28 11:30:13 +0200
commitdb41bc89ef1e0bb737fd24c36898c2c1fabb7cc0 (patch)
tree798e5f953864091eb14870b42e8687d1d9381b5d
parentd383965f431ee738a6db2da35d4092dfb108b739 (diff)
downloadranger-db41bc89ef1e0bb737fd24c36898c2c1fabb7cc0.tar.gz
defaults.apps: retain order of files in app_feh mode 11
-rw-r--r--ranger/defaults/apps.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py
index cd745ff8..8c766419 100644
--- a/ranger/defaults/apps.py
+++ b/ranger/defaults/apps.py
@@ -140,7 +140,9 @@ class CustomApplications(Applications):
 		if c.mode in arg: # mode 1, 2 and 3 will set the image as the background
 			return tup('feh', arg[c.mode], c.file.path)
 		if c.mode is 11 and len(c.files) is 1: # view all files in the cwd
-			return tup('feh', self.fm.env.cwd.path, '--start-at', *c)
+			directory = self.fm.env.get_directory(c.file.dirname)
+			images = (f.basename for f in directory.files if f.image)
+			return tup('feh', '--start-at', c.file.basename, *images)
 		return tup('feh', *c)
 
 	@depends_on('aunpack')