0
0
mirror of https://github.com/vim/vim.git synced 2025-09-05 21:43:39 -04:00

patch 7.4.766

Problem:    Background color check does not work on Tera Term.
Solution:   Also recognize ST as a termination character. (Hirohito Higashi)
This commit is contained in:
Bram Moolenaar 2015-07-03 13:05:50 +02:00
parent 9bb1930af9
commit 92abe859ed
2 changed files with 11 additions and 4 deletions

View File

@ -4264,7 +4264,9 @@ check_termcode(max_offset, buf, bufsize, buflen)
* *
* - Background color response: * - Background color response:
* <Esc>]11;rgb:{rrrr}/{gggg}/{bbbb}\007 * <Esc>]11;rgb:{rrrr}/{gggg}/{bbbb}\007
* The final byte must be '\007'. * Or
* <Esc>]11;rgb:{rrrr}/{gggg}/{bbbb}ST
* The final byte must be '\007' or ST(0x9c or ESC\).
*/ */
char_u *argp = tp[0] == CSI ? tp + 1 : tp + 2; char_u *argp = tp[0] == CSI ? tp + 1 : tp + 2;
@ -4408,12 +4410,15 @@ check_termcode(max_offset, buf, bufsize, buflen)
key_name[1] = (int)KE_IGNORE; key_name[1] = (int)KE_IGNORE;
slen = i + 1; slen = i + 1;
} }
else if (*T_RBG != NUL && len >= 24 - (tp[0] == CSI) else if (*T_RBG != NUL
&& len >= 24 - (tp[0] == CSI)
&& len >= 24 - (tp[0] == CSI) + (argp[21] == ESC)
&& argp[0] == '1' && argp[1] == '1' && argp[0] == '1' && argp[1] == '1'
&& argp[2] == ';' && argp[3] == 'r' && argp[4] == 'g' && argp[2] == ';' && argp[3] == 'r' && argp[4] == 'g'
&& argp[5] == 'b' && argp[6] == ':' && argp[5] == 'b' && argp[6] == ':'
&& argp[11] == '/' && argp[16] == '/' && argp[11] == '/' && argp[16] == '/'
&& argp[21] == '\007') && (argp[21] == '\007' || argp[21] == STERM
|| (argp[21] == ESC && argp[22] == '\\')))
{ {
LOG_TR("Received RBG"); LOG_TR("Received RBG");
rbg_status = RBG_GOT; rbg_status = RBG_GOT;
@ -4427,7 +4432,7 @@ check_termcode(max_offset, buf, bufsize, buflen)
} }
key_name[0] = (int)KS_EXTRA; key_name[0] = (int)KS_EXTRA;
key_name[1] = (int)KE_IGNORE; key_name[1] = (int)KE_IGNORE;
slen = 24; slen = 24 - (tp[0] == CSI) + (argp[21] == ESC);
} }
} }

View File

@ -741,6 +741,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 */
/**/
766,
/**/ /**/
765, 765,
/**/ /**/