From e9be8e67d2655f2c073a9ae2d390e56a318a955d Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 20 Jun 2021 09:33:25 -0400 Subject: [PATCH] kitty_wipe: don't set INVALIDATED unless in QUIESCENT #1395 --- src/lib/kitty.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/kitty.c b/src/lib/kitty.c index 25cdf567b..17b0d2e96 100644 --- a/src/lib/kitty.c +++ b/src/lib/kitty.c @@ -393,7 +393,9 @@ int kitty_wipe(sprixel* s, int ycell, int xcell){ //fprintf(stderr, "CLEARED ROW, TARGY: %d\n", targy - 1); if(--targy == 0){ s->n->tam[s->dimx * ycell + xcell].auxvector = auxvec; - s->invalidated = SPRIXEL_INVALIDATED; + if(s->invalidated == SPRIXEL_QUIESCENT){ + s->invalidated = SPRIXEL_INVALIDATED; + } return 1; } thisrow = targx; @@ -612,7 +614,6 @@ int kitty_destroy(const notcurses* nc __attribute__ ((unused)), // returns the number of bytes written int kitty_draw(const ncpile* p, sprixel* s, FILE* out){ -fprintf(stderr, "DRAWING %d\n", s->id); (void)p; int ret = s->glyphlen; if(fwrite(s->glyph, s->glyphlen, 1, out) != 1){ @@ -623,7 +624,6 @@ fprintf(stderr, "DRAWING %d\n", s->id); } int kitty_move(const ncpile* p, sprixel* s, FILE* out){ -fprintf(stderr, "MOVING %d\n", s->id); (void)p; int ret = 0; if(fprintf(out, "\e_Ga=p,i=%d,p=1,q=2\e\\", s->id) < 0){ @@ -631,7 +631,6 @@ fprintf(stderr, "MOVING %d\n", s->id); } s->invalidated = SPRIXEL_QUIESCENT; return ret; - //return kitty_draw(p, s, out); } // clears all kitty bitmaps