ncdirect_init: don't force query_term()

This commit is contained in:
nick black 2021-02-27 16:02:35 -05:00 committed by Nick Black
parent da6435c517
commit 6d3c8e1add
2 changed files with 4 additions and 8 deletions

View File

@ -696,9 +696,6 @@ ncdirect* ncdirect_core_init(const char* termtype, FILE* outfp, uint64_t flags){
if(interrogate_terminfo(&ret->tcache, shortname_term, utf8)){
goto err;
}
if(query_term(&ret->tcache, ret->ctermfd)){
goto err;
}
ncdirect_set_styles(ret, 0);
return ret;

View File

@ -782,8 +782,7 @@ init_banner(const notcurses* nc){
" terminfo from %s\n",
nc->stdplane->leny, nc->stdplane->lenx,
bprefix(nc->stats.fbbytes, 1, prefixbuf, 0), sizeof(nccell),
nc->tcache.colors,
nc->tcache.RGBflag ? "+RGB" : "",
nc->tcache.colors, nc->tcache.RGBflag ? "+RGB" : "",
__VERSION__,
#ifdef __BYTE_ORDER__
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
@ -1029,6 +1028,9 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
if(ncinputlayer_init(&ret->input, stdin)){
goto err;
}
if(make_nonblocking(ret->input.ttyinfd)){
goto err;
}
// Neither of these is supported on e.g. the "linux" virtual console.
if(!(opts->flags & NCOPTION_NO_ALTERNATE_SCREEN)){
terminfostr(&ret->tcache.smcup, "smcup");
@ -1052,9 +1054,6 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
}
reset_term_attributes(ret);
}
if(make_nonblocking(ret->input.ttyinfd)){
goto err;
}
if((ret->rstate.mstreamfp = open_memstream(&ret->rstate.mstream, &ret->rstate.mstrsize)) == NULL){
free_plane(ret->stdplane);
goto err;