forked from aniani/vim
patch 8.0.1128: old xterm sends CTRL-X in response to t_RS
Problem: Old xterm sends CTRL-X in response to t_RS. Solution: Only send t_RS for xterm 279 and later. Remove the workaround to ignore CTRL-X.
This commit is contained in:
parent
a8e93d63e3
commit
e22bbf6508
19
src/term.c
19
src/term.c
@ -4580,9 +4580,12 @@ check_termcode(
|
|||||||
is_not_xterm = TRUE;
|
is_not_xterm = TRUE;
|
||||||
|
|
||||||
/* Only request the cursor style if t_SH and t_RS are
|
/* Only request the cursor style if t_SH and t_RS are
|
||||||
* set. Not for Terminal.app, it can't handle t_RS, it
|
* set. Only supported properly by xterm since version
|
||||||
|
* 279 (otherwise it returns 0x18).
|
||||||
|
* Not for Terminal.app, it can't handle t_RS, it
|
||||||
* echoes the characters to the screen. */
|
* echoes the characters to the screen. */
|
||||||
if (rcs_status == STATUS_GET
|
if (rcs_status == STATUS_GET
|
||||||
|
&& version >= 279
|
||||||
&& !is_not_xterm
|
&& !is_not_xterm
|
||||||
&& *T_CSH != NUL
|
&& *T_CSH != NUL
|
||||||
&& *T_CRS != NUL)
|
&& *T_CRS != NUL)
|
||||||
@ -4729,11 +4732,6 @@ 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;
|
|
||||||
# ifdef FEAT_EVAL
|
# ifdef FEAT_EVAL
|
||||||
set_vim_var_string(VV_TERMRGBRESP, tp, slen);
|
set_vim_var_string(VV_TERMRGBRESP, tp, slen);
|
||||||
# endif
|
# endif
|
||||||
@ -4782,11 +4780,6 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5470,8 +5463,8 @@ check_termcode(
|
|||||||
/*
|
/*
|
||||||
* Avoid computing the difference between mouse_time
|
* Avoid computing the difference between mouse_time
|
||||||
* and orig_mouse_time for the first click, as the
|
* and orig_mouse_time for the first click, as the
|
||||||
* difference would be huge and would cause multiplication
|
* difference would be huge and would cause
|
||||||
* overflow.
|
* multiplication overflow.
|
||||||
*/
|
*/
|
||||||
timediff = p_mouset;
|
timediff = p_mouset;
|
||||||
}
|
}
|
||||||
|
@ -761,6 +761,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 */
|
||||||
|
/**/
|
||||||
|
1128,
|
||||||
/**/
|
/**/
|
||||||
1127,
|
1127,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user