TUI: terminfo_start: use unibi_from_term directly (#9072)

Avoids redundant call to `getenv("TERM")`.

Ref: e3b16d6219/uniutil.c (L203-L211)
This commit is contained in:
Daniel Hahler 2018-09-30 20:39:45 +02:00 committed by Justin M. Keyes
parent 3999aa755e
commit 3bdc34d065

View File

@ -209,7 +209,7 @@ static void terminfo_start(UI *ui)
// Set up unibilium/terminfo.
const char *term = os_getenv("TERM");
data->ut = unibi_from_env();
data->ut = unibi_from_term(term);
char *termname = NULL;
if (!term || !data->ut) {
data->ut = terminfo_from_builtin(term, &termname);