Skip to content

Commit

Permalink
patch 8.0.1069: still get CTRL-X sometimes
Browse files Browse the repository at this point in the history
Problem:    Still get CTRL-X sometimes for t_RS request.
Solution:   Also skip 0x18 after a key code response.
  • Loading branch information
brammool committed Sep 7, 2017
1 parent 618d6d2 commit 37b5327
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/term.c
Expand Up @@ -4741,9 +4741,10 @@ check_termcode(
key_name[0] = (int)KS_EXTRA;
key_name[1] = (int)KE_IGNORE;
slen = i + 1 + (tp[i] == ESC);
if (tp[i] == 0x07 && i + 1 < len && tp[i + 1] == 0x18)
/* Sometimes the 0x07 is followed by 0x18, unclear
* when this happens. */
if (rcs_status == STATUS_SENT
&& slen < len && tp[slen] == 0x18)
/* Some older xterm send 0x18 for the T_RS request,
* skip it here. */
++slen;
# ifdef FEAT_EVAL
set_vim_var_string(VV_TERMRGBRESP, tp, slen);
Expand Down Expand Up @@ -4793,6 +4794,11 @@ check_termcode(
key_name[0] = (int)KS_EXTRA;
key_name[1] = (int)KE_IGNORE;
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;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -769,6 +769,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1069,
/**/
1068,
/**/
Expand Down

0 comments on commit 37b5327

Please sign in to comment.