mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
properly reposition cursor on shutdown in 0 render case
This commit is contained in:
parent
60ff6a73d6
commit
f71dbd6413
@ -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…
x
Reference in New Issue
Block a user