Skip to content

Commit

Permalink
lack of smcup is not a reason to abort #2085
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Aug 22, 2021
1 parent e63be1c commit d022a56
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib/notcurses.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d022a56

Please sign in to comment.