diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index 861f4e7f0..c8a448aa6 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -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);