fix(tui): don't set cursor color when there is none (#28236)

This commit is contained in:
Sam 2024-04-09 11:05:15 +03:00 committed by GitHub
parent 4a1eec85dd
commit 168e69ae01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1237,7 +1237,7 @@ static void tui_set_mode(TUIData *tui, ModeShape mode)
// We interpret "inverse" as "default" (no termcode for "inverse"...). // We interpret "inverse" as "default" (no termcode for "inverse"...).
// Hopefully the user's default cursor color is inverse. // Hopefully the user's default cursor color is inverse.
unibi_out_ext(tui, tui->unibi_ext.reset_cursor_color); unibi_out_ext(tui, tui->unibi_ext.reset_cursor_color);
} else { } else if (!tui->want_invisible && aep.rgb_bg_color >= 0) {
char hexbuf[8]; char hexbuf[8];
if (tui->set_cursor_color_as_str) { if (tui->set_cursor_color_as_str) {
snprintf(hexbuf, 7 + 1, "#%06x", aep.rgb_bg_color); snprintf(hexbuf, 7 + 1, "#%06x", aep.rgb_bg_color);