Skip to content

Commit

Permalink
kitty_wipe_selfref: update auxvec with state #2143
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Sep 10, 2021
1 parent e703024 commit 4a6e45a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/kitty.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,10 @@ int kitty_wipe_selfref(sprixel* s, int ycell, int xcell){
if(init_sprixel_animation(s)){
return -1;
}
logdebug("Wiping sprixel %u at %d/%d\n", s->id, ycell, xcell);
const int tyx = xcell + ycell * s->dimx;
int state = s->n->tam[tyx].state;
void* auxvec = s->n->tam[tyx].auxvector;
logdebug("Wiping sprixel %u at %d/%d auxvec: %p state: %d\n", s->id, ycell, xcell, auxvec, state);
fbuf* f = &s->glyph;
if(fbuf_printf(f, "\e_Ga=f,x=%d,y=%d,s=%d,v=%d,i=%d,X=1,r=2,c=1,q=2;",
xcell * s->cellpxx, ycell * s->cellpxy,
Expand Down Expand Up @@ -453,6 +456,7 @@ int kitty_wipe_selfref(sprixel* s, int ycell, int xcell){
return -1;
}
s->invalidated = SPRIXEL_INVALIDATED;
memcpy(auxvec, &state, sizeof(state));
return 1;
}

Expand Down

0 comments on commit 4a6e45a

Please sign in to comment.