|
|
@ -3699,18 +3699,23 @@ int mojibake_demo(struct notcurses* nc){
|
|
|
|
do{
|
|
|
|
do{
|
|
|
|
unsigned u = topmost;
|
|
|
|
unsigned u = topmost;
|
|
|
|
do{
|
|
|
|
do{
|
|
|
|
int y, x, leny;
|
|
|
|
int y, x, leny, lenx;
|
|
|
|
ncplane_yx(planes[u], &y, &x);
|
|
|
|
ncplane_yx(planes[u], &y, &x);
|
|
|
|
if(y >= dimy){
|
|
|
|
if(y >= dimy){
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(ncplane_move_yx(planes[u], y - 1, x)){
|
|
|
|
ncplane_dim_yx(planes[u], &leny, &lenx);
|
|
|
|
|
|
|
|
if(y == 1){
|
|
|
|
|
|
|
|
if(leny > 1){
|
|
|
|
|
|
|
|
if(ncplane_resize(planes[u], 1, 0, leny - 1, lenx, -1, 0, leny - 1, lenx)){
|
|
|
|
|
|
|
|
goto err;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
++topmost;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else if(ncplane_move_yx(planes[u], y - 1, x)){
|
|
|
|
goto err;
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ncplane_dim_yx(planes[u], &leny, NULL);
|
|
|
|
|
|
|
|
if(leny + y + 1 == 0){
|
|
|
|
|
|
|
|
++topmost;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(leny + y + 1 == dimy - 1){
|
|
|
|
if(leny + y + 1 == dimy - 1){
|
|
|
|
if(u + 1 < sizeof(planes) / sizeof(*planes)){
|
|
|
|
if(u + 1 < sizeof(planes) / sizeof(*planes)){
|
|
|
|
if(ncplane_move_yx(planes[u + 1], dimy - 1, x)){
|
|
|
|
if(ncplane_move_yx(planes[u + 1], dimy - 1, x)){
|
|
|
|