about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-06-08 12:15:26 +0200
committertoonn <toonn@toonn.io>2021-06-08 12:15:26 +0200
commitbff3c6be9b11f2705de115cd7bfa0053c4f86dc9 (patch)
tree1730abe2c2708b756be94f2f5b0fcd11122e532c
parent5d1452376e38cc9175c3576161c351768bd86f54 (diff)
parent4895901e30af675af229bf630b73527d3aac99f2 (diff)
downloadranger-bff3c6be9b11f2705de115cd7bfa0053c4f86dc9.tar.gz
Merge remote-tracking branch 'Barbarossa93/master'
-rw-r--r--ranger/ext/img_display.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py
index b738f458..6cb6a815 100644
--- a/ranger/ext/img_display.py
+++ b/ranger/ext/img_display.py
@@ -298,7 +298,7 @@ class ITerm2ImageDisplayer(ImageDisplayer, FileManagerAware):
         content = self._encode_image_content(path)
         display_protocol = "\033"
         close_protocol = "\a"
-        if "screen" in os.environ['TERM']:
+        if os.environ["TERM"].startswith(("screen", "tmux")):
             display_protocol += "Ptmux;\033\033"
             close_protocol += "\033\\"
 
@@ -430,7 +430,7 @@ class URXVTImageDisplayer(ImageDisplayer, FileManagerAware):
     def __init__(self):
         self.display_protocol = "\033"
         self.close_protocol = "\a"
-        if "screen" in os.environ['TERM']:
+        if os.environ["TERM"].startswith(("screen", "tmux")):
             self.display_protocol += "Ptmux;\033\033"
             self.close_protocol += "\033\\"
         self.display_protocol += "]20;"