diff --git a/docs/changelog.rst b/docs/changelog.rst index 9486d4a0a..4b186fa19 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -16,6 +16,9 @@ To update |kitty|, :doc:`follow the instructions `. - Adjust cell height automatically for buggy fonts that draw brackets outside the bounding box +- Fix image leaving behind a black rectangle when switch away and back to + alternate screen (:iss:`2901`) + 0.18.2 [2020-07-28] -------------------- diff --git a/kitty/graphics.c b/kitty/graphics.c index 809d868b8..2150d2c82 100644 --- a/kitty/graphics.c +++ b/kitty/graphics.c @@ -646,7 +646,7 @@ grman_update_layers(GraphicsManager *self, unsigned int scrolled_by, float scree static inline void filter_refs(GraphicsManager *self, const void* data, bool free_images, bool (*filter_func)(ImageRef*, Image*, const void*, CellPixelSize), CellPixelSize cell) { - self->layers_dirty = self->image_count > 0; + if (self->image_count) self->layers_dirty = true; for (size_t i = self->image_count; i-- > 0;) { Image *img = self->images + i; for (size_t j = img->refcnt; j-- > 0;) {