raster: don't mix sixel and cup #200

pull/1379/head
nick black 4 years ago committed by Nick Black
parent ea7630692a
commit b8281801d6

@ -452,17 +452,18 @@ ncdirect_dump_plane(ncdirect* n, const ncplane* np, int xoff){
return -1;
}
pixelmode = false;
}
// FIXME replace with a SGR clear
ncdirect_set_fg_default(n);
ncdirect_set_bg_default(n);
if(putc('\n', n->ttyfp) == EOF){
return -1;
}
if(y == toty){
if(ncdirect_cursor_down(n, 1)){
}else{
// FIXME replace with a SGR clear
ncdirect_set_fg_default(n);
ncdirect_set_bg_default(n);
if(putc('\n', n->ttyfp) == EOF){
return -1;
}
if(y == toty){
if(ncdirect_cursor_down(n, 1)){
return -1;
}
}
}
}
// restore the previous colors

@ -873,6 +873,9 @@ goto_location(notcurses* nc, FILE* out, int y, int x){
if(nc->rstate.x == x){ // needn't move shit
return 0;
}
if(nc->rstate.pixelmode && leave_pixel_mode(nc, out)){
return -1;
}
if(x == nc->rstate.x + 1 && nc->tcache.cuf1){
ret = term_emit(nc->tcache.cuf1, out, false);
}else{
@ -880,6 +883,9 @@ goto_location(notcurses* nc, FILE* out, int y, int x){
}
}else{
// cup is required, no need to check for existence
if(nc->rstate.pixelmode && leave_pixel_mode(nc, out)){
return -1;
}
ret = term_emit(tiparm(nc->tcache.cup, y, x), out, false);
}
if(ret == 0){

Loading…
Cancel
Save