about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-11-17 02:34:46 +0100
committerhut <hut@lavabit.com>2010-11-17 02:34:46 +0100
commit6f7e95101cab739967c3f8edb4e1f6b8906e3794 (patch)
tree67384a3f1d90d13510105d9a4f0729347a80bf8a
parent7a3a429c67678a0e721f71b6f9c0ca7664bbfeee (diff)
downloadranger-6f7e95101cab739967c3f8edb4e1f6b8906e3794.tar.gz
core.actions: added update_preview()
-rw-r--r--ranger/core/actions.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 80eb7fd9..b52ae0ed 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -575,6 +575,13 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 	# --------------------------
 	# -- Previews
 	# --------------------------
+	def update_preview(self, path):
+		try:
+			del self.previews[path]
+			self.ui.need_redraw = True
+		except:
+			return False
+
 	def get_preview(self, path, width, height):
 		if self.settings.preview_script and self.settings.use_preview_script:
 			# self.previews is a 2 dimensional dict: