properly reposition cursor on shutdown in 0 render case

pull/1384/head
nick black 3 years ago
parent 60ff6a73d6
commit f71dbd6413
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1206,8 +1206,11 @@ int notcurses_stop(notcurses* nc){
// if we were not using the alternate screen, our cursor's wherever we last
// wrote. move it to the bottom left of the screen.
if(!nc->tcache.smcup){
// FIXME combine into a single cup (heh)?
tty_emit(tiparm(nc->tcache.hpa, 0), nc->ttyfd);
tty_emit(tiparm(nc->tcache.vpa, nc->lfdimy + nc->margin_t - 1), nc->ttyfd);
if(nc->lfdimy){
tty_emit(tiparm(nc->tcache.vpa, nc->lfdimy + nc->margin_t - 1), nc->ttyfd);
}
}
if(nc->ttyfd >= 0){
ret |= close(nc->ttyfd);

Loading…
Cancel
Save