// The t_8u code may default to a value but get reset when the term response is
// received. To avoid redrawing too often, only redraw when t_8u is not reset
-// and it was supposed to be written.
+// and it was supposed to be written. Unless t_8u was set explicitly.
// FALSE -> don't output t_8u yet
// MAYBE -> tried outputing t_8u while FALSE
// OK -> can write t_8u
term_ul_rgb_color(guicolor_T rgb)
{
# ifdef FEAT_TERMRESPONSE
- if (write_t_8u_state != OK)
+ // If the user explicitly sets t_8u then use it. Otherwise wait for
+ // termresponse to be received, which is when t_8u would be set and a
+ // redraw is needed if it was used.
+ if (!option_was_set((char_u *)"t_8u") && write_t_8u_state != OK)
write_t_8u_state = MAYBE;
else
# endif