diff options
-rw-r--r-- | ranger/gui/widgets/browserview.py | 12 |
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: |