# HG changeset patch # User Christian Brabandt # Date 1503599404 -7200 # Node ID 2b965b3dd20c18e37b5d5d4c7dce6ae70f69e24b # Parent fc791b69be7746af31af0a184e7c149c14bbc1f4 patch 8.0.0993: sometimes an xterm sends an extra CTRL-X commit https://github.com/vim/vim/commit/f6d9f96b2d67327bbadd7210acc7c6028439bbcd Author: Bram Moolenaar Date: Thu Aug 24 20:21:16 2017 +0200 patch 8.0.0993: sometimes an xterm sends an extra CTRL-X Problem: Sometimes an xterm sends an extra CTRL-X after the response for the background color. Related to t_RS. Solution: Check for the CTRL-X after the terminating 0x7. diff --git a/src/term.c b/src/term.c --- a/src/term.c +++ b/src/term.c @@ -4626,6 +4626,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. */ + ++slen; break; } if (i == len) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 993, +/**/ 992, /**/ 991,