summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-10 00:53:45 +0200
committerhut <hut@lavabit.com>2010-04-10 00:53:45 +0200
commit44a28601f4e1ab857e75ee4a48f45464f2ff3eff (patch)
tree1f5f08af2aebb303d9f9cc3df392aa3872a0bd77
parent035a39a8a468ba842fd69a2370aba8ac3c1f3d39 (diff)
downloadranger-44a28601f4e1ab857e75ee4a48f45464f2ff3eff.tar.gz
widgets.browserview: fixed collapse_preview
-rw-r--r--ranger/gui/widgets/browserview.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py
index 163fd503..7f2ea5fb 100644
--- a/ranger/gui/widgets/browserview.py
+++ b/ranger/gui/widgets/browserview.py
@@ -264,7 +264,7 @@ class BrowserView(Widget, DisplayableContainer):
 	def poke(self):
 		DisplayableContainer.poke(self)
 		if self.settings.collapse_preview and self.preview:
-			has_preview = self.columns[-2].has_preview()
+			has_preview = self.columns[-1].has_preview()
 			if self.preview_available != has_preview:
 				self.preview_available = has_preview
 				self.resize(self.y, self.x, self.hei, self.wid)
c1fd31aafefa9e'>^
796074b5 ^
dcbc83fe ^
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








                                                                                 
                                                                  




                            
                                                                
                                                     




                                                              
                                            
    
                           
  
#!/bin/bash
#
# This script searches image files in a directory, opens them all with sxiv
# and sets the first argument to the first image displayed by sxiv.
#
# This is supposed to be used in rifle.conf as a workaround for the fact that
# sxiv takes no file name arguments for the first image, just the number.
# Copy this file somewhere into your $PATH and add this at the top of rifle.conf:
#
#   mime ^image, has sxiv, X, flag f = path/to/this/script -- "$@"
#

[ "$1" == '--' ] && shift
target="$(realpath -s "$1")"
function listfiles {
    find -L "$(dirname "$target")" -maxdepth 1 -type f -iregex \
      '.*\(jpe?g\|bmp\|png\|gif\)$' -print0 | sort -z
}

count="$(listfiles | grep -m 1 -Zznx "$target" | cut -d: -f1)"

if [ -n "$count" ]; then
    listfiles | xargs -0 sxiv -n "$count" --
else
    sxiv -- "$@" # fallback
fi