fix(tui): also reset cursor color if it was invisible (#31348)

This commit is contained in:
Gregory Anders 2024-11-25 16:32:03 -06:00 committed by GitHub
parent 29c72cdf4a
commit f81131cca2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1304,7 +1304,7 @@ static void tui_set_mode(TUIData *tui, ModeShape mode)
unibi_out_ext(tui, tui->unibi_ext.set_cursor_color);
tui->cursor_has_color = true;
}
} else if (c.id == 0 && tui->cursor_has_color) {
} else if (c.id == 0 && (tui->want_invisible || tui->cursor_has_color)) {
// No cursor color for this mode; reset to default.
tui->want_invisible = false;
tui->cursor_has_color = false;