mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
postpaint(): no need to replace nul with space #777
This commit is contained in:
parent
a97297192d
commit
5512158fc5
@ -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…
x
Reference in New Issue
Block a user