diff --git a/src/demo/reel.c b/src/demo/reel.c index 865d2dafd..8ca18cd8c 100644 --- a/src/demo/reel.c +++ b/src/demo/reel.c @@ -83,7 +83,7 @@ tabletdraw(struct ncplane* w, int maxy, tabletctx* tctx, unsigned rgb){ } cell_release(w, &c); } - return y - 1; + return y; } static int diff --git a/src/lib/reel.c b/src/lib/reel.c index 6b92274f4..cd80543a7 100644 --- a/src/lib/reel.c +++ b/src/lib/reel.c @@ -276,9 +276,10 @@ ncreel_draw_tablet(const ncreel* nr, nctablet* t, int frontiertop, ++cbx; } if(cbleny - cby + 1 > 0){ - t->cbp = ncplane_new(t->p, cbleny - cby + 1, cblenx - cbx + 1, cby, cbx, NULL, "tdat"); +//fprintf(stderr, "CREATING %dx%d\n", cbleny, cblenx); + t->cbp = ncplane_new(t->p, cbleny, cblenx, cby, cbx, NULL, "tdat"); if(t->cbp == NULL){ -//fprintf(stderr, "failure creating data plane %d %d %d %d\n", cbleny - cby + 1, cblenx - cbx + 1, cby, cbx); +//fprintf(stderr, "failure creating data plane %d %d %d %d\n", cbleny, cblenx, cby, cbx); ncplane_destroy(t->p); t->p = NULL; return -1; diff --git a/tests/reel.cpp b/tests/reel.cpp index b4d0180d4..92409c601 100644 --- a/tests/reel.cpp +++ b/tests/reel.cpp @@ -73,7 +73,7 @@ int check_allborders(nctablet* t, bool drawfromtop) { ncplane_dim_yx(ncp, &rows, &cols); int srows, scols; ncplane_dim_yx(notcurses_stdplane(ncplane_notcurses(ncp)), &srows, &scols); - CHECK(srows == rows + 4); + CHECK(srows == rows + 2); CHECK(scols == cols + 4); return 1; } @@ -99,7 +99,7 @@ int check_notborders(nctablet* t, bool drawfromtop) { ncplane_dim_yx(ncp, &rows, &cols); int srows, scols; ncplane_dim_yx(notcurses_stdplane(ncplane_notcurses(ncp)), &srows, &scols); - CHECK(srows == rows + 2); + CHECK(srows == rows); // we get maximum possible size to try out CHECK(scols == cols + 2); return 1; }