diff options
author | hut <hut@lepus.uberspace.de> | 2014-02-15 13:05:48 +0100 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2014-02-15 13:05:48 +0100 |
commit | aa594ec92b015c5d26698136e6aca61815d1e4b4 (patch) | |
tree | 88084faea9514de03266f362372f708d85df5d20 | |
parent | a4f1c363597fe63e94f6f9a48a05fe63e9903b82 (diff) | |
parent | 23345a7875357405c774d47335322aee933692c0 (diff) | |
download | ranger-aa594ec92b015c5d26698136e6aca61815d1e4b4.tar.gz |
Merge branch 'master' of https://github.com/punzik/ranger
-rw-r--r-- | ranger/container/file.py | 2 | ||||
-rw-r--r-- | ranger/container/settings.py | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/ranger/container/file.py b/ranger/container/file.py index 7c11dc63..3205ce61 100644 --- a/ranger/container/file.py +++ b/ranger/container/file.py @@ -68,6 +68,8 @@ class File(FileSystemObject): return False if not self.accessible: return False + if self.size > self.fm.settings.preview_max_size: + return False if self.fm.settings.preview_script and \ self.fm.settings.use_preview_script: return True diff --git a/ranger/container/settings.py b/ranger/container/settings.py index 27fed711..f46acd38 100644 --- a/ranger/container/settings.py +++ b/ranger/container/settings.py @@ -31,6 +31,7 @@ ALLOWED_SETTINGS = { 'preview_files': bool, 'preview_images': bool, 'preview_script': (str, type(None)), + 'preview_max_size': int, 'save_console_history': bool, 'scroll_offset': int, 'shorten_title': int, |