lack of smcup is not a reason to abort #2085

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

@ -1228,9 +1228,12 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
// the alternate screen; we're not even going to bother clearing the screen.
if(ret->tcache.ttyfd >= 0){
if(!(opts->flags & NCOPTION_NO_ALTERNATE_SCREEN)){
if(enter_alternate_screen(ret->ttyfp, &ret->tcache, false)){
free_plane(ret->stdplane);
goto err;
const char* smcup = get_escape(&ret->tcache, ESCAPE_SMCUP);
if(smcup){
if(enter_alternate_screen(ret->ttyfp, &ret->tcache, false)){
free_plane(ret->stdplane);
goto err;
}
}
// perform an explicit clear since the alternate screen was requested
// (smcup *might* clear, but who knows? and it might not have been

Loading…
Cancel
Save