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.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:
='n158' href='#n158'>158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204