restore termios settings before calling rmcup

pull/2148/head
nick black 3 years ago
parent a299c3226d
commit cb039eafdf
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -98,6 +98,9 @@ notcurses_stop_minimal(void* vnc){
}
}
if(nc->tcache.ttyfd >= 0){
if(nc->tcache.tpreserved){
ret |= tcsetattr(nc->tcache.ttyfd, TCSAFLUSH, nc->tcache.tpreserved);
}
if((esc = get_escape(&nc->tcache, ESCAPE_RMCUP))){
if(sprite_clear_all(&nc->tcache, f)){
ret = -1;
@ -106,9 +109,6 @@ notcurses_stop_minimal(void* vnc){
ret = -1;
}
}
if(nc->tcache.tpreserved){
ret |= tcsetattr(nc->tcache.ttyfd, TCSAFLUSH, nc->tcache.tpreserved);
}
}
if((esc = get_escape(&nc->tcache, ESCAPE_RMKX)) && fbuf_emit(f, esc)){
ret = -1;

Loading…
Cancel
Save