summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/actions.py3
-rw-r--r--ranger/core/fm.py5
2 files changed, 7 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 3b30fe6b..eb091186 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -1025,7 +1025,8 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
             return path
 
         cacheimg = os.path.join(ranger.args.cachedir, self.sha1_encode(path))
-        if os.path.isfile(cacheimg) and \
+        if self.settings.preview_images and \
+                os.path.isfile(cacheimg) and \
                 os.path.getmtime(cacheimg) > os.path.getmtime(path):
             data['foundpreview'] = True
             data['imagepreview'] = True
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index e53d36e1..9f409a94 100644
--- a/ranger/core/fm.py
+++ b/ranger/core/fm.py
@@ -104,6 +104,11 @@ class FM(Actions,  # pylint: disable=too-many-instance-attributes
         self.settings.signal_bind('setopt.preview_images_method', set_image_displayer,
                                   priority=settings.SIGNAL_PRIORITY_AFTER_SYNC)
 
+        self.settings.signal_bind(
+            'setopt.preview_images',
+            lambda signal: setattr(signal.fm, 'previews', {}),
+        )
+
         if ranger.args.clean:
             self.tags = TagsDummy("")
         elif self.tags is None:
18 17:11:54 +0200 Removed built-in support for uninstalling.' href='/akspecs/ranger/commit/INSTALL?h=v1.9.0b3&id=b06433bc03632ae0fe74381fa0a474d64b0fee94'>b06433bc ^
582f3519 ^
b06433bc ^
3edc9f86 ^
b06433bc ^
7582555b ^
84c49ab7 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23