summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/directory.py2
-rw-r--r--ranger/gui/widgets/browsercolumn.py10
2 files changed, 9 insertions, 3 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 6c9ab7b1..71afa06a 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -242,6 +242,8 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 				or self.old_sort != self.settings.sort \
 				or self.old_reverse != self.settings.reverse:
 			self.sort()
+			return True
+		return False
 
 	def move_to_obj(self, arg):
 		try:
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index c05473e2..5e98acf8 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -85,6 +85,13 @@ class BrowserColumn(Pager, Widget):
 			self.need_redraw = True
 			self.old_cf = self.target.pointed_obj
 
+		if type(self.target) == Directory:
+			if self.target.load_content_if_outdated():
+				self.need_redraw = True
+			else:
+				if self.target.sort_if_outdated():
+					self.need_redraw = True
+
 		if self.need_redraw:
 			self.win.erase()
 			if self.target is None:
@@ -131,9 +138,6 @@ class BrowserColumn(Pager, Widget):
 
 		self.win.move(0, 0)
 
-		if not self.target.load_content_if_outdated():
-			self.target.sort_if_outdated()
-
 		if not self.target.content_loaded:
 			maxdirsize = self.settings.max_dirsize_for_autopreview
 			if not self.target.force_load and maxdirsize is not None \
='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