diff options
author | mark-dawn <albama92@gmail.com> | 2018-02-25 00:19:03 +0100 |
---|---|---|
committer | mark-dawn <albama92@gmail.com> | 2018-05-29 10:08:11 +0200 |
commit | 77a65efe3f436c8d46c09a4f84b2d6f38ba228a3 (patch) | |
tree | 9d3af19d3aa16b146dbab0bf82b7b57708e1585e | |
parent | 8730f1ec6e20048f04298f866d4ed8b23836db57 (diff) | |
download | ranger-77a65efe3f436c8d46c09a4f84b2d6f38ba228a3.tar.gz |
Consistency Fixes
Made so images are displayed in the top left corner of the preview pane Fixed incorrect exit on python2
-rw-r--r-- | ranger/ext/img_display.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py index 17c730df..49bbc200 100644 --- a/ranger/ext/img_display.py +++ b/ranger/ext/img_display.py @@ -580,8 +580,8 @@ class KittyImageDisplayer(ImageDisplayer): image = image.resize((int(scale * image.width), int(scale * image.height)), self.backend.LANCZOS) - start_x += ((box[0] - image.width) // 2) // self.pix_row - start_y += ((box[1] - image.height) // 2) // self.pix_col + # start_x += ((box[0] - image.width) // 2) // self.pix_row + # start_y += ((box[1] - image.height) // 2) // self.pix_col if self.stream: # encode the whole image as base64 # TODO: implement z compression @@ -664,5 +664,5 @@ class KittyImageDisplayer(ImageDisplayer): while self.temp_paths: try: os.remove(self.temp_paths.pop()) - except IOError: + except (OSError, IOError): continue |