diff options
author | hut <hut@lavabit.com> | 2010-10-11 07:34:50 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-10-11 07:40:21 +0200 |
commit | 2bcb509a0834828829b8ca01d5679ee22c416267 (patch) | |
tree | 80d1153e7627bf0a9b12a1a0855959a18d8a1082 /ranger | |
parent | 6ab2c84a6b3b8d015f9e808f6fbba5846677e9f7 (diff) | |
download | ranger-2bcb509a0834828829b8ca01d5679ee22c416267.tar.gz |
widgets.browserview: again, fixed collapse_preview option
Diffstat (limited to 'ranger')
-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: |