diff options
author | pirate486743186 <okgomdjgbmoij@gmail.com> | 2021-08-27 12:46:05 +0200 |
---|---|---|
committer | pirate486743186 <okgomdjgbmoij@gmail.com> | 2021-08-27 12:46:05 +0200 |
commit | 652a971a1ebf70311b46cd41cbe6c5d4891b5ff6 (patch) | |
tree | da701495f35554d4e37157e13f9222d2a4c0dd07 /ranger | |
parent | 4b004f2a8915bfbb9628b651b140932e4b823297 (diff) | |
download | ranger-652a971a1ebf70311b46cd41cbe6c5d4891b5ff6.tar.gz |
fix w3m method in 32bit
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/ext/img_display.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py index 569d03a9..3eaa0b20 100644 --- a/ranger/ext/img_display.py +++ b/ranger/ext/img_display.py @@ -187,6 +187,9 @@ class W3MImageDisplayer(ImageDisplayer, FileManagerAware): self.initialize() input_gen = self._generate_w3m_input(path, start_x, start_y, width, height) + self.process.stdin.write(input_gen) + self.process.stdin.flush() + self.process.stdout.readline() # Mitigate the issue with the horizontal black bars when # selecting some images on some systems. 2 milliseconds seems @@ -195,11 +198,10 @@ class W3MImageDisplayer(ImageDisplayer, FileManagerAware): from time import sleep sleep(self.fm.settings.w3m_delay) - self.process.stdin.write(input_gen) - self.process.stdin.flush() - self.process.stdout.readline() + #HACK workaround for w3mimgdisplay memory leak self.quit() self.is_initialized = False + #HACK def clear(self, start_x, start_y, width, height): if not self.is_initialized or self.process.poll() is not None: |