summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/defaults/options.py1
-rw-r--r--ranger/gui/widgets/filelistcontainer.py2
-rw-r--r--ranger/shared/settings.py1
3 files changed, 3 insertions, 1 deletions
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py
index f78d0a81..3bd4ad02 100644
--- a/ranger/defaults/options.py
+++ b/ranger/defaults/options.py
@@ -4,6 +4,7 @@ from ranger import colorschemes
 colorscheme = colorschemes.default
 
 show_hidden = False
+collapse_preview = True
 
 scroll_offset = 2
 directories_first = True
diff --git a/ranger/gui/widgets/filelistcontainer.py b/ranger/gui/widgets/filelistcontainer.py
index 594d0530..fa4ec989 100644
--- a/ranger/gui/widgets/filelistcontainer.py
+++ b/ranger/gui/widgets/filelistcontainer.py
@@ -58,7 +58,7 @@ class FileListContainer(Widget, DisplayableContainer):
 	
 	def poke(self):
 		DisplayableContainer.poke(self)
-		if self.preview:
+		if self.settings.collapse_preview and self.preview:
 			has_preview = self.container[-1].has_preview()
 			if self.preview_available != has_preview:
 				self.preview_available = has_preview
diff --git a/ranger/shared/settings.py b/ranger/shared/settings.py
index 820e81b0..46dc77e8 100644
--- a/ranger/shared/settings.py
+++ b/ranger/shared/settings.py
@@ -1,6 +1,7 @@
 ALLOWED_SETTINGS = """
 show_hidden scroll_offset directories_first
 preview_files max_history_size colorscheme
+collapse_preview
 apps keys
 """.split()