summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/widgets/browsercolumn.py2
-rw-r--r--ranger/gui/widgets/browserview.py4
2 files changed, 6 insertions, 0 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index 5422b960..c0d22658 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -113,6 +113,8 @@ class BrowserColumn(Pager):
 	def poke(self):
 		Widget.poke(self)
 		self.target = self.env.at_level(self.level)
+		if self.target and self.target.is_file and self.has_preview():
+			self.visible = True
 
 	def draw(self):
 		"""Call either _draw_file() or _draw_directory()"""
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py
index a4626412..54fc28f2 100644
--- a/ranger/gui/widgets/browserview.py
+++ b/ranger/gui/widgets/browserview.py
@@ -235,6 +235,10 @@ class BrowserView(Widget, DisplayableContainer):
 			if i == last_i:
 				if not cut_off:
 					wid = int(self.wid - left + 1 - pad)
+				else:
+					self.columns[i].resize(pad, left - 1, hei - pad * 2, 1)
+					self.columns[i].visible = False
+					continue
 
 			if i == last_i - 1:
 				self.pager.resize(pad, left, hei - pad * 2, \