diff options
author | hut <hut@lavabit.com> | 2010-11-17 02:34:46 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-11-17 02:34:46 +0100 |
commit | 6f7e95101cab739967c3f8edb4e1f6b8906e3794 (patch) | |
tree | 67384a3f1d90d13510105d9a4f0729347a80bf8a /ranger | |
parent | 7a3a429c67678a0e721f71b6f9c0ca7664bbfeee (diff) | |
download | ranger-6f7e95101cab739967c3f8edb4e1f6b8906e3794.tar.gz |
core.actions: added update_preview()
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/actions.py | 7 |
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: |