From 8d6b32b77e5a0d53582b8c1801c359574813f3d8 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Sun, 6 Jan 2019 15:48:37 +0100 Subject: Fix the Kitty previews in fullscreen mode Fixes #1431. --- ranger/ext/img_display.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py index 9c84ce5e..7c9f35a7 100644 --- a/ranger/ext/img_display.py +++ b/ranger/ext/img_display.py @@ -484,7 +484,7 @@ class URXVTImageFSDisplayer(URXVTImageDisplayer): return self._get_centered_offsets() -class KittyImageDisplayer(ImageDisplayer): +class KittyImageDisplayer(ImageDisplayer, FileManagerAware): """Implementation of ImageDisplayer for kitty (https://github.com/kovidgoyal/kitty/) terminal. It uses the built APC to send commands and data to kitty, which in turn renders the image. The APC takes the form @@ -649,6 +649,8 @@ class KittyImageDisplayer(ImageDisplayer): # kitty doesn't seem to reply on deletes, checking like we do in draw() # will slows down scrolling with timeouts from select self.image_id -= 1 + self.fm.ui.win.redrawwin() + self.fm.ui.win.refresh() def _format_cmd_str(self, cmd, payload=None, max_slice_len=2048): central_blk = ','.join(["{}={}".format(k, v) for k, v in cmd.items()]).encode('ascii') -- cgit 1.4.1-2-gfad0