render: fix setting of channel on wide

This commit is contained in:
nick black 2020-01-15 05:57:39 -05:00 committed by Nick Black
parent 97c0a34504
commit 98446b4810
2 changed files with 16 additions and 2 deletions

View File

@ -316,13 +316,13 @@ ns_to_timespec(uint64_t ns, struct timespec* ts){
}
static inline void
cell_debug(const ncplane* p, const cell* c){
cell_debug(const egcpool* p, const cell* c){
if(cell_simple_p(c)){
fprintf(stderr, "gcluster: %u %c attr: 0x%08x chan: 0x%016lx\n",
c->gcluster, c->gcluster, c->attrword, c->channels);
}else{
fprintf(stderr, "gcluster: %u %s attr: 0x%08x chan: 0x%016lx\n",
c->gcluster, extended_gcluster(p, c), c->attrword, c->channels);
c->gcluster, egcpool_extended_gcluster(p, c), c->attrword, c->channels);
}
}

View File

@ -293,6 +293,20 @@ fprintf(stderr, "WROTE %u [%c] to %d/%d (%d/%d)\n", prevcell->gcluster, prevcell
fprintf(stderr, "WROTE %u [%s] to %d/%d (%d/%d)\n", prevcell->gcluster, egcpool_extended_gcluster(&nc->pool, prevcell), y, x, absy, absx);
}*/
crender->damaged = true;
if(cell_double_wide_p(targc)){
ncplane* tmpp = crender->p;
++crender;
crender->p = tmpp;
++x;
++prevcell;
++targc;
targc->gcluster = 0;
targc->channels = targc[-1].channels;
targc->attrword = targc[-1].attrword;
if(cellcmp_and_dupfar(&nc->pool, prevcell, crender->p, targc)){
crender->damaged = true;
}
}
}
}
}