diff --git a/CHANGELOG.md b/CHANGELOG.md index 85dc3762..70ab43b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -101,6 +101,7 @@ character in the last column. * Crash when reverse-scrolling (terminfo capability `rin`) such that the current viewport ends up outside the scrollback ([#2232][2232]). +* Regression: visual glitches in rare circumstances. [2232]: https://codeberg.org/dnkl/foot/issues/2232 diff --git a/shm.c b/shm.c index 72b32f16..f488d6b6 100644 --- a/shm.c +++ b/shm.c @@ -628,14 +628,14 @@ shm_get_buffer(struct buffer_chain *chain, int width, int height, bool with_alph else #endif { - if (cached == NULL) + if (cached == NULL) { cached = buf; - else { + } else { /* We have multiple buffers eligible for * reuse. Pick the "youngest" one, and mark the * other one for purging */ if (buf->public.age < cached->public.age) { - //shm_unref(&cached->public); + shm_unref(&cached->public); cached = buf; } else { /* @@ -646,8 +646,8 @@ shm_get_buffer(struct buffer_chain *chain, int width, int height, bool with_alph * should be safe; "our" tll_foreach() already * holds the next pointer. */ - //if (buffer_unref_no_remove_from_chain(buf)) - // tll_remove(chain->bufs, it); + if (buffer_unref_no_remove_from_chain(buf)) + tll_remove(chain->bufs, it); } } }