about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authormark-dawn <albama92@gmail.com>2018-02-25 00:19:03 +0100
committermark-dawn <albama92@gmail.com>2018-05-29 10:08:11 +0200
commit77a65efe3f436c8d46c09a4f84b2d6f38ba228a3 (patch)
tree9d3af19d3aa16b146dbab0bf82b7b57708e1585e /ranger
parent8730f1ec6e20048f04298f866d4ed8b23836db57 (diff)
downloadranger-77a65efe3f436c8d46c09a4f84b2d6f38ba228a3.tar.gz
Consistency Fixes
Made so images are displayed in the top left corner of the preview pane
Fixed incorrect exit on python2
Diffstat (limited to 'ranger')
-rw-r--r--ranger/ext/img_display.py6
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