mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
fix(tui): do not set ui_client_termname if it is already set (#21607)
It is fine to initialize ui_client_termname to NULL as it is only used after tui_start().
This commit is contained in:
parent
f60cff8f9a
commit
c590641feb
@ -310,11 +310,12 @@ static void terminfo_start(UI *ui)
|
||||
#endif
|
||||
|
||||
// Set up unibilium/terminfo.
|
||||
ui_client_termname = NULL;
|
||||
if (term) {
|
||||
data->ut = unibi_from_term(term);
|
||||
if (data->ut) {
|
||||
ui_client_termname = xstrdup(term);
|
||||
if (!ui_client_termname) {
|
||||
ui_client_termname = xstrdup(term);
|
||||
}
|
||||
if (!data->term) {
|
||||
data->term = xstrdup(term);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ EXTERN TriState ui_client_bg_respose INIT(= kNone);
|
||||
/// by convention, this uses fd=3 (next free number after stdio)
|
||||
EXTERN bool ui_client_forward_stdin INIT(= false);
|
||||
|
||||
EXTERN char *ui_client_termname INIT(= "null");
|
||||
EXTERN char *ui_client_termname INIT(= NULL);
|
||||
|
||||
#define UI_CLIENT_STDIN_FD 3
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
|
Loading…
Reference in New Issue
Block a user