mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
terminfo_start: use unibi_from_term, skip without TERM (#10670)
This is clearer/more explicit and avoids potential mismatch between what unibilium thinks vs what Nvim thinks.
For reference: e3b16d6219/uniutil.c (L203-L211)
This commit is contained in:
parent
a270c33b3a
commit
24fb7eefaa
@ -227,12 +227,15 @@ static void terminfo_start(UI *ui)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set up unibilium/terminfo.
|
// Set up unibilium/terminfo.
|
||||||
data->ut = unibi_from_env();
|
|
||||||
char *termname = NULL;
|
char *termname = NULL;
|
||||||
if (!term || !data->ut) {
|
if (term) {
|
||||||
|
data->ut = unibi_from_term(term);
|
||||||
|
if (data->ut) {
|
||||||
|
termname = xstrdup(term);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!data->ut) {
|
||||||
data->ut = terminfo_from_builtin(term, &termname);
|
data->ut = terminfo_from_builtin(term, &termname);
|
||||||
} else {
|
|
||||||
termname = xstrdup(term);
|
|
||||||
}
|
}
|
||||||
// Update 'term' option.
|
// Update 'term' option.
|
||||||
loop_schedule_deferred(&main_loop,
|
loop_schedule_deferred(&main_loop,
|
||||||
|
Loading…
Reference in New Issue
Block a user