diff --git a/src/lib/direct.cpp b/src/lib/direct.cpp index 674e04c3a..ab4a7368d 100644 --- a/src/lib/direct.cpp +++ b/src/lib/direct.cpp @@ -672,10 +672,9 @@ ncdirect* ncdirect_core_init(const char* termtype, FILE* outfp, uint64_t flags){ if(ncvisual_init(NCLOGLEVEL_SILENT)){ goto err; } - if(interrogate_terminfo(&ret->tcache, shortname_term)){ + if(interrogate_terminfo(&ret->tcache, shortname_term, utf8)){ goto err; } - ret->tcache.utf8 = utf8; ncdirect_set_styles(ret, 0); return ret; diff --git a/src/lib/internal.h b/src/lib/internal.h index 492a0024a..ef31cb83d 100644 --- a/src/lib/internal.h +++ b/src/lib/internal.h @@ -373,7 +373,7 @@ void sigwinch_handler(int signo); void init_lang(notcurses* nc); // nc may be NULL, only used for logging int terminfostr(char** gseq, const char* name); -int interrogate_terminfo(tinfo* ti, const char* termname); +int interrogate_terminfo(tinfo* ti, const char* termname, unsigned utf8); // if there were missing elements we wanted from terminfo, bitch about them here void warn_terminfo(const notcurses* nc, const tinfo* ti); diff --git a/src/lib/terminfo.c b/src/lib/terminfo.c index 24a6ba240..e587b521d 100644 --- a/src/lib/terminfo.c +++ b/src/lib/terminfo.c @@ -69,19 +69,12 @@ apply_term_heuristics(tinfo* ti, const char* termname){ return 0; } -// there are some capabilities that we want, but can work around. if the -// logging level is set to "warn" or higher, go ahead and complain. -void warn_terminfo(const notcurses* nc, const tinfo* ti){ - if(!ti->hpa){ - logwarn(nc, "No horizontal position absolute capability"); - } -} - // termname is just the TERM environment variable. some details are not // exposed via terminfo, and we must make heuristic decisions based on // the detected terminal type, yuck :/. -int interrogate_terminfo(tinfo* ti, const char* termname){ +int interrogate_terminfo(tinfo* ti, const char* termname, unsigned utf8){ memset(ti, 0, sizeof(*ti)); + ti->utf8 = utf8; ti->RGBflag = query_rgb(); int colors = tigetnum("colors"); if(colors <= 0){ diff --git a/src/poc/1350.c b/src/poc/1350.c index 2193d7bd5..99e0f6e4c 100644 --- a/src/poc/1350.c +++ b/src/poc/1350.c @@ -46,6 +46,9 @@ static int query_address(struct notcurses *nc, struct ncplane *plane, plane_opts.x = strlen(question) + 1; struct ncplane *reader_plane = ncplane_create(plane, &plane_opts); + uint64_t channels = 0; + channels_set_bg_alpha(&channels, CELL_ALPHA_TRANSPARENT); + ncplane_set_base(reader_plane, "", 0, channels); struct ncreader_options reader_opts = {0}; reader_opts.flags = NCREADER_OPTION_CURSOR;