mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
Check that cell is not wide right in render #362
This commit is contained in:
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…
Reference in New Issue
Block a user