summary refs log tree commit diff stats
path: root/ranger/gui/widgets/browsercolumn.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/gui/widgets/browsercolumn.py')
-rw-r--r--ranger/gui/widgets/browsercolumn.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index bcc48cd1..ed6b26d1 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -108,6 +108,10 @@ class BrowserColumn(Pager):
 			if not self._preview_this_file(self.target):
 				return False
 
+		if self.target.is_directory:
+			if not self.settings.preview_directories:
+				return False
+
 		return True
 
 	def poke(self):
@@ -173,6 +177,9 @@ class BrowserColumn(Pager):
 		"""Draw the contents of a directory"""
 		import stat
 
+		if self.level > 0 and not self.settings.preview_directories:
+			return
+
 		base_color = ['in_browser']
 
 		self.target.use()