mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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
|
#endif
|
||||||
|
|
||||||
// Set up unibilium/terminfo.
|
// Set up unibilium/terminfo.
|
||||||
ui_client_termname = NULL;
|
|
||||||
if (term) {
|
if (term) {
|
||||||
data->ut = unibi_from_term(term);
|
data->ut = unibi_from_term(term);
|
||||||
if (data->ut) {
|
if (data->ut) {
|
||||||
ui_client_termname = xstrdup(term);
|
if (!ui_client_termname) {
|
||||||
|
ui_client_termname = xstrdup(term);
|
||||||
|
}
|
||||||
if (!data->term) {
|
if (!data->term) {
|
||||||
data->term = xstrdup(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)
|
/// by convention, this uses fd=3 (next free number after stdio)
|
||||||
EXTERN bool ui_client_forward_stdin INIT(= false);
|
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
|
#define UI_CLIENT_STDIN_FD 3
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||||
|
Loading…
Reference in New Issue
Block a user