postpaint(): no need to replace nul with space #777

pull/783/head
nick black 4 years ago
parent a97297192d
commit 5512158fc5
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -414,9 +414,6 @@ postpaint(cell* fb, cell* lastframe, int dimy, int dimx,
struct crender* crender = &rvec[fbcellidx(y, dimx, x)];
lock_in_highcontrast(targc, crender);
cell* prevcell = &lastframe[fbcellidx(y, dimx, x)];
if(targc->gcluster == 0){
targc->gcluster = ' ';
}
if(cellcmp_and_dupfar(pool, prevcell, crender->p, targc)){
crender->damaged = true;
}

@ -160,7 +160,7 @@ TEST_CASE("Scrolling") {
if(i < 11){
CHECK(next2[i - 1] == *egc);
}else{
CHECK(' ' == *egc);
CHECK('\0' == *egc);
}
free(egc);
}
@ -193,7 +193,7 @@ TEST_CASE("Scrolling") {
if(i < 11){
CHECK(onext[i - 1] == *egc);
}else{
CHECK(' ' == *egc);
CHECK('\0' == *egc);
}
free(egc);
}

@ -363,7 +363,7 @@ TEST_CASE("Wide") {
// 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);
@ -461,7 +461,7 @@ TEST_CASE("Wide") {
CHECK(widechans == channels);
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 1, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 2, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
@ -483,7 +483,7 @@ TEST_CASE("Wide") {
CHECK(narchans == channels);
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 7, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
CHECK(0 == ncplane_move_yx(topp, 0, 2));
CHECK(0 == notcurses_render(nc_));
@ -492,7 +492,7 @@ TEST_CASE("Wide") {
CHECK(widechans == channels);
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 1, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 2, &attrword, &channels)));
CHECK(0 == strcmp(egc, "a"));
@ -539,14 +539,14 @@ TEST_CASE("Wide") {
CHECK(narchans == channels);
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 5, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 6, &attrword, &channels)));
CHECK(0 == strcmp(egc, ""));
CHECK(widechans == channels);
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 7, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
CHECK(0 == ncplane_move_yx(topp, 0, 0));
CHECK(0 == notcurses_render(nc_));
@ -578,7 +578,7 @@ TEST_CASE("Wide") {
CHECK(widechans == channels);
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 7, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
ncplane_destroy(topp);
}
@ -627,7 +627,7 @@ TEST_CASE("Wide") {
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 1, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 2, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
@ -645,7 +645,7 @@ TEST_CASE("Wide") {
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 7, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
CHECK(0 == ncplane_move_yx(topp, 0, 2));
CHECK(0 == notcurses_render(nc_));
@ -653,7 +653,7 @@ TEST_CASE("Wide") {
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 1, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 2, &attrword, &channels)));
CHECK(0 == strcmp(egc, ""));
@ -691,13 +691,13 @@ TEST_CASE("Wide") {
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 5, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 6, &attrword, &channels)));
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 7, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
CHECK(0 == ncplane_move_yx(topp, 0, 0));
CHECK(0 == notcurses_render(nc_));
@ -723,7 +723,7 @@ TEST_CASE("Wide") {
CHECK(0 == strcmp(egc, ""));
free(egc);
REQUIRE((egc = notcurses_at_yx(nc_, 0, 7, &attrword, &channels)));
CHECK(0 == strcmp(egc, " "));
CHECK(0 == strcmp(egc, ""));
free(egc);
ncplane_destroy(topp);
}

Loading…
Cancel
Save