mirror of
https://github.com/ihabunek/toot
synced 2024-12-23 07:27:12 +01:00
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.
This commit is contained in:
parent
b264927da9
commit
1ea2e29e25
@ -28,7 +28,6 @@ try:
|
|||||||
global _ImageCls
|
global _ImageCls
|
||||||
|
|
||||||
if not _ImageCls:
|
if not _ImageCls:
|
||||||
BaseImage.forced_support = True
|
|
||||||
_ImageCls = (
|
_ImageCls = (
|
||||||
KittyImage
|
KittyImage
|
||||||
if image_format == 'kitty'
|
if image_format == 'kitty'
|
||||||
@ -36,6 +35,7 @@ try:
|
|||||||
if image_format == 'iterm'
|
if image_format == 'iterm'
|
||||||
else BlockImage
|
else BlockImage
|
||||||
)
|
)
|
||||||
|
_ImageCls.forced_support = True
|
||||||
|
|
||||||
return _ImageCls(image)
|
return _ImageCls(image)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user