forked from aniani/vim
patch 8.2.4777: screendump tests fail because of a redraw
Problem: Screendump tests fail because of a redraw. Solution: Do not output t_8u before receiving termresponse. Redraw only when t_8u is not reset and termresponse is received.
This commit is contained in:
23
src/term.c
23
src/term.c
@@ -165,6 +165,14 @@ static termrequest_T *all_termrequests[] = {
|
|||||||
&winpos_status,
|
&winpos_status,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
// FALSE -> don't output t_8u yet
|
||||||
|
// MAYBE -> tried outputing t_8u while FALSE
|
||||||
|
// OK -> can write t_8u
|
||||||
|
int write_t_8u_state = FALSE;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2104,6 +2112,7 @@ set_termname(char_u *term)
|
|||||||
#ifdef FEAT_TERMRESPONSE
|
#ifdef FEAT_TERMRESPONSE
|
||||||
LOG_TR(("setting crv_status to STATUS_GET"));
|
LOG_TR(("setting crv_status to STATUS_GET"));
|
||||||
crv_status.tr_progress = STATUS_GET; // Get terminal version later
|
crv_status.tr_progress = STATUS_GET; // Get terminal version later
|
||||||
|
write_t_8u_state = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3049,6 +3058,8 @@ term_rgb_color(char_u *s, guicolor_T rgb)
|
|||||||
#define MAX_COLOR_STR_LEN 100
|
#define MAX_COLOR_STR_LEN 100
|
||||||
char buf[MAX_COLOR_STR_LEN];
|
char buf[MAX_COLOR_STR_LEN];
|
||||||
|
|
||||||
|
if (*s == NUL)
|
||||||
|
return;
|
||||||
vim_snprintf(buf, MAX_COLOR_STR_LEN,
|
vim_snprintf(buf, MAX_COLOR_STR_LEN,
|
||||||
(char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
|
(char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
|
||||||
#ifdef FEAT_VTP
|
#ifdef FEAT_VTP
|
||||||
@@ -3078,7 +3089,12 @@ term_bg_rgb_color(guicolor_T rgb)
|
|||||||
void
|
void
|
||||||
term_ul_rgb_color(guicolor_T rgb)
|
term_ul_rgb_color(guicolor_T rgb)
|
||||||
{
|
{
|
||||||
term_rgb_color(T_8U, rgb);
|
# ifdef FEAT_TERMRESPONSE
|
||||||
|
if (write_t_8u_state != OK)
|
||||||
|
write_t_8u_state = MAYBE;
|
||||||
|
else
|
||||||
|
# endif
|
||||||
|
term_rgb_color(T_8U, rgb);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -4814,8 +4830,11 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
|
|||||||
{
|
{
|
||||||
set_string_option_direct((char_u *)"t_8u", -1, (char_u *)"",
|
set_string_option_direct((char_u *)"t_8u", -1, (char_u *)"",
|
||||||
OPT_FREE, 0);
|
OPT_FREE, 0);
|
||||||
redraw_later(CLEAR);
|
|
||||||
}
|
}
|
||||||
|
if (*T_8U != NUL && write_t_8u_state == MAYBE)
|
||||||
|
// Did skip writing t_8u, a complete redraw is needed.
|
||||||
|
redraw_later_clear();
|
||||||
|
write_t_8u_state = OK; // can otuput t_8u now
|
||||||
|
|
||||||
// Only set 'ttymouse' automatically if it was not set
|
// Only set 'ttymouse' automatically if it was not set
|
||||||
// by the user already.
|
// by the user already.
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4777,
|
||||||
/**/
|
/**/
|
||||||
4776,
|
4776,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user