summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-10-11 07:34:50 +0200
committerhut <hut@lavabit.com>2010-10-11 07:40:21 +0200
commit2bcb509a0834828829b8ca01d5679ee22c416267 (patch)
tree80d1153e7627bf0a9b12a1a0855959a18d8a1082 /ranger
parent6ab2c84a6b3b8d015f9e808f6fbba5846677e9f7 (diff)
downloadranger-2bcb509a0834828829b8ca01d5679ee22c416267.tar.gz
widgets.browserview: again, fixed collapse_preview option
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/widgets/browserview.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py
index bbaee6a2..e222c582 100644
--- a/ranger/gui/widgets/browserview.py
+++ b/ranger/gui/widgets/browserview.py
@@ -197,12 +197,12 @@ class BrowserView(Widget, DisplayableContainer):
 
 	def _collapse(self):
 		# Should the last column be cut off? (Because there is no preview)
-		result = self.settings.collapse_preview and self.preview and \
-			not self.columns[-1].has_preview() and self.stretch_ratios
-		if result:
-			return True
-		if self.columns[-1].target:
-			target = self.columns[-1].target
+		if not self.settings.collapse_preview or not self.preview \
+				or not self.stretch_ratios:
+			return False
+		result = not self.columns[-1].has_preview()
+		target = self.columns[-1].target
+		if not result and target and target.is_file:
 			try:
 				result = not self.fm.previews[target.realpath]['foundpreview']
 			except: