From 2bcb509a0834828829b8ca01d5679ee22c416267 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 11 Oct 2010 07:34:50 +0200 Subject: widgets.browserview: again, fixed collapse_preview option --- ranger/gui/widgets/browserview.py | 12 ++++++------ 1 file 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: -- cgit 1.4.1-2-gfad0