From 1ea2e29e2563f34cedfbe1f15ad7260684f3b84e Mon Sep 17 00:00:00 2001 From: AnonymouX47 Date: Tue, 4 Jun 2024 08:59:09 +0100 Subject: [PATCH] fix: Fix iTerm2's title with image support enabled - Fix: Force support support only for the selected image format. If support is forced for `KittyImage`, then `UrwidImageScreen` will emit kitty graphics control sequences to delete images upon starting and stoping the screen. iTerm2 (on Mac OS) doesn't eat up APCs (which kitty graphics control sequences are) as it should, instead it writes them to the screen and/or to its title bar. --- toot/tui/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toot/tui/images.py b/toot/tui/images.py index 00ebfe7..c74489c 100644 --- a/toot/tui/images.py +++ b/toot/tui/images.py @@ -28,7 +28,6 @@ try: global _ImageCls if not _ImageCls: - BaseImage.forced_support = True _ImageCls = ( KittyImage if image_format == 'kitty' @@ -36,6 +35,7 @@ try: if image_format == 'iterm' else BlockImage ) + _ImageCls.forced_support = True return _ImageCls(image)