summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/defaults/options.py2
-rw-r--r--ranger/gui/widgets/filelist.py16
-rw-r--r--ranger/shared/settings.py2
3 files changed, 13 insertions, 7 deletions
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py
index 3bd4ad02..d466b5dc 100644
--- a/ranger/defaults/options.py
+++ b/ranger/defaults/options.py
@@ -10,4 +10,4 @@ scroll_offset = 2
 directories_first = True
 preview_files = False
 max_history_size = 20
-
+auto_load_preview = True
diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/filelist.py
index f5b69e26..1e5c748d 100644
--- a/ranger/gui/widgets/filelist.py
+++ b/ranger/gui/widgets/filelist.py
@@ -111,11 +111,17 @@ class FileList(Widget):
 		self.target.use()
 
 		if not self.target.content_loaded:
-			self.color(base_color)
-			self.win.addnstr(self.y, self.x, "...", self.wid)
-			self.color_reset()
-			self.postpone_drawing = True
-			return
+			if self.settings.auto_load_preview:
+				self.color(base_color)
+				self.win.addnstr(self.y, self.x, "...", self.wid)
+				self.color_reset()
+				self.postpone_drawing = True
+				return
+			else:
+				self.color(base_color, 'error')
+				self.win.addnstr(self.y, self.x, "not loaded", self.wid)
+				self.color_reset()
+				return
 
 		self.target.load_content_if_outdated()
 		self.target.sort_if_outdated()
diff --git a/ranger/shared/settings.py b/ranger/shared/settings.py
index 46dc77e8..5541b191 100644
--- a/ranger/shared/settings.py
+++ b/ranger/shared/settings.py
@@ -1,7 +1,7 @@
 ALLOWED_SETTINGS = """
 show_hidden scroll_offset directories_first
 preview_files max_history_size colorscheme
-collapse_preview
+collapse_preview auto_load_preview
 apps keys
 """.split()