0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.0.1069: still get CTRL-X sometimes

Problem:    Still get CTRL-X sometimes for t_RS request.
Solution:   Also skip 0x18 after a key code response.
This commit is contained in:
Bram Moolenaar
2017-09-07 20:18:40 +02:00
parent 618d6d277e
commit 37b53270e1
2 changed files with 11 additions and 3 deletions

View File

@@ -4741,9 +4741,10 @@ check_termcode(
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 = i + 1 + (tp[i] == ESC); slen = i + 1 + (tp[i] == ESC);
if (tp[i] == 0x07 && i + 1 < len && tp[i + 1] == 0x18) if (rcs_status == STATUS_SENT
/* Sometimes the 0x07 is followed by 0x18, unclear && slen < len && tp[slen] == 0x18)
* when this happens. */ /* Some older xterm send 0x18 for the T_RS request,
* skip it here. */
++slen; ++slen;
# ifdef FEAT_EVAL # ifdef FEAT_EVAL
set_vim_var_string(VV_TERMRGBRESP, tp, slen); set_vim_var_string(VV_TERMRGBRESP, tp, slen);
@@ -4793,6 +4794,11 @@ check_termcode(
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 = i + 1 + (tp[i] == ESC); slen = i + 1 + (tp[i] == ESC);
if (rcs_status == STATUS_SENT
&& slen < len && tp[slen] == 0x18)
/* Some older xterm send 0x18 for the T_RS request,
* skip it here. */
++slen;
break; break;
} }
} }

View File

@@ -769,6 +769,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 */
/**/
1069,
/**/ /**/
1068, 1068,
/**/ /**/