mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
fix(unittests): fix TUI broken test previously ignored
This commit is contained in:
@@ -655,7 +655,7 @@ static HandleState handle_background_color(TermInput *input)
|
||||
bool is_dark = luminance < 0.5;
|
||||
char *bgvalue = is_dark ? "dark" : "light";
|
||||
DLOG("bg response: %s", bgvalue);
|
||||
ui_client_bg_respose = is_dark ? kTrue : kFalse;
|
||||
ui_client_bg_response = is_dark ? kTrue : kFalse;
|
||||
set_bg(bgvalue);
|
||||
input->waiting_for_bg_response = 0;
|
||||
} else if (!done && !bad) {
|
||||
|
@@ -84,8 +84,8 @@ void ui_client_run(bool remote_ui)
|
||||
if (term) {
|
||||
PUT(opts, "term_name", STRING_OBJ(cstr_to_string(term)));
|
||||
}
|
||||
if (ui_client_bg_respose != kNone) {
|
||||
bool is_dark = (ui_client_bg_respose == kTrue);
|
||||
if (ui_client_bg_response != kNone) {
|
||||
bool is_dark = (ui_client_bg_response == kTrue);
|
||||
PUT_C(opts, "term_background", STRING_OBJ(cstr_as_string(is_dark ? "dark" : "light")));
|
||||
}
|
||||
PUT_C(opts, "term_colors", INTEGER_OBJ(t_colors));
|
||||
|
@@ -31,7 +31,7 @@ EXTERN bool ui_client_attached INIT(= false);
|
||||
|
||||
/// Whether ui client has gotten a response about the bg color of the terminal,
|
||||
/// kTrue=dark, kFalse=light, kNone=no response yet
|
||||
EXTERN TriState ui_client_bg_respose INIT(= kNone);
|
||||
EXTERN TriState ui_client_bg_response INIT(= kNone);
|
||||
|
||||
/// The ui client should forward its stdin to the nvim process
|
||||
/// by convention, this uses fd=3 (next free number after stdio)
|
||||
|
Reference in New Issue
Block a user