changeset 12379:25f854eefe98 v8.0.1069

patch 8.0.1069: still get CTRL-X sometimes commit https://github.com/vim/vim/commit/37b53270e1a65d1d56187a3d68439e666e8b75fd Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 7 20:18:40 2017 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Thu, 07 Sep 2017 20:30:04 +0200
parents 46c3e92ab77a
children 811338160414
files src/term.c src/version.c
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -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);
@@ -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;
 		    }
 		  }
--- 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 */
 /**/
+    1069,
+/**/
     1068,
 /**/
     1067,