mfontanini / presenterm

A markdown terminal slideshow tool
https://mfontanini.github.io/presenterm/
BSD 2-Clause "Simplified" License
1.19k stars 29 forks source link

Modals show up behind images in kitty terminal #153

Closed mfontanini closed 8 months ago

mfontanini commented 8 months ago

The kitty graphics protocol treats images as non cell-based entities and therefore if you write an image at position (x, y) and then move the cursor back to (x, y) and write text, it won't overwrite the image. In order to control image stacking, it uses z-indexes so that you can specify whether an image is on top of text, in between the text and the background, or behind the background (and also image over image stacking but we don't care). This causes every application that uses the kitty protocol and needs the use of a modal to have extra code to deal with this, see the discussion here https://github.com/kovidgoyal/kitty/issues/6988.

Unfortunately, viuer doesn't currently support z-indexes (I created a PR for this here https://github.com/atanunq/viuer/pull/53), so the plan to get around this behavior in kitty is: