Check that cell is not wide right in render #362

pull/472/head
nick black 5 years ago committed by Nick Black
parent b0aa6b9a7f
commit b0fc654444

@ -1250,6 +1250,7 @@ int ncplane_putc_yx(ncplane* n, int y, int x, const cell* c){
}
cell_obliterate(n, candidate);
cell_set_wide(candidate);
candidate->channels = c->channels;
}
}
n->x += cols;

@ -279,7 +279,7 @@ paint(ncplane* p, cell* lastframe, struct crender* rvec,
const cell* vis = &p->fb[nfbcellidx(p, y, x)];
// if we never loaded any content into the cell (or obliterated it by
// writing in a zero), use the plane's base cell.
if(vis->gcluster == 0){
if(vis->gcluster == 0 && !cell_wide_right_p(vis)){
vis = &p->basecell;
}
// if we have no character in this cell, we continue to look for a

@ -122,7 +122,7 @@ TEST_CASE("RenderTest") {
// should be nothing, having been stomped
egc = notcurses_at_yx(nc_, 0, 3, &c.attrword, &c.channels);
REQUIRE(egc);
CHECK(0 == strcmp(" ", egc));
CHECK(0 == strcmp("", egc));
free(egc);
cell_init(&c);

Loading…
Cancel
Save