summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@hut.pm>2017-07-07 12:54:41 +0200
committerhut <hut@hut.pm>2017-07-07 12:54:41 +0200
commit5e644ae68ebba7abbc8aa92266e7f8b9e8d97a8a (patch)
tree4ef069416ad9e83ec83655bcfbf8204187c45d14
parentc46b6770b66edc77169da3a399f093f9ec81ab62 (diff)
downloadranger-5e644ae68ebba7abbc8aa92266e7f8b9e8d97a8a.tar.gz
core.fm: more efficient preview cache cleaning
-rw-r--r--ranger/core/fm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index 9f409a94..76aa7876 100644
--- a/ranger/core/fm.py
+++ b/ranger/core/fm.py
@@ -106,7 +106,7 @@ class FM(Actions,  # pylint: disable=too-many-instance-attributes
 
         self.settings.signal_bind(
             'setopt.preview_images',
-            lambda signal: setattr(signal.fm, 'previews', {}),
+            lambda signal: signal.fm.previews.clear(),
         )
 
         if ranger.args.clean:
ref='#n119'>119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155