about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-02-09 22:51:37 +0100
committerhut <hut@lavabit.com>2010-02-11 03:04:24 +0100
commit1cb6afa91181b95464b3b30d6a603c1554c0309d (patch)
treec714b30bbf558fd74e9612fdb575278632021a52 /ranger
parent26dce0988cb3e5b0425f05e407fb504e1aa0f0e1 (diff)
downloadranger-1cb6afa91181b95464b3b30d6a603c1554c0309d.tar.gz
browsercolumn: bugfix
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/widgets/browsercolumn.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index 5e16498e..a8bc0292 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -113,17 +113,14 @@ class BrowserColumn(Pager, Widget):
 			self.need_redraw = True
 			self.old_dir = self.target
 
-		if self.target.is_directory \
-				and self.target.pointed_obj != self.old_cf:
-			self.need_redraw = True
-			self.old_cf = self.target.pointed_obj
-
-		if self.target.is_directory:
-			if self.target.load_content_if_outdated():
+		if self.target and self.target.is_directory:
+			if self.target.pointed_obj != self.old_cf:
 				self.need_redraw = True
-			elif self.target.sort_if_outdated():
-				self.need_redraw = True
-			elif self.last_redraw_time < self.target.last_update_time:
+				self.old_cf = self.target.pointed_obj
+
+			if self.target.load_content_if_outdated() \
+			or self.target.sort_if_outdated() \
+			or self.last_redraw_time < self.target.last_update_time:
 				self.need_redraw = True
 
 		if self.need_redraw: