summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-07 20:18:40 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-07 20:18:40 +0200
commit37b53270e1a65d1d56187a3d68439e666e8b75fd (patch)
tree3744edd677145c024d349196f5e208190cf13f8d /src/term.c
parent618d6d277e7b64ea03fcefdd75d673e8973b46c4 (diff)
downloadvim-git-37b53270e1a65d1d56187a3d68439e666e8b75fd.tar.gz
patch 8.0.1069: still get CTRL-X sometimesv8.0.1069
Problem: Still get CTRL-X sometimes for t_RS request. Solution: Also skip 0x18 after a key code response.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c
index aedcc1988..bc8c6ace2 100644
--- 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;
}
}