mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
patch 8.1.0566: SGR not enabled for mintty because $TERM is "xterm"
Problem: SGR not enabled for mintty because $TERM is "xterm". Solution: Detect mintty by the termresponse. (Ken Takata, closes #3667)
This commit is contained in:
parent
10600db772
commit
20091c18c4
11
src/term.c
11
src/term.c
@ -4698,6 +4698,12 @@ check_termcode(
|
|||||||
int need_flush = FALSE;
|
int need_flush = FALSE;
|
||||||
# ifdef FEAT_MOUSE_SGR
|
# ifdef FEAT_MOUSE_SGR
|
||||||
int is_iterm2 = FALSE;
|
int is_iterm2 = FALSE;
|
||||||
|
int is_mintty = FALSE;
|
||||||
|
|
||||||
|
// mintty 2.9.5 sends 77;20905;0c.
|
||||||
|
// (77 is ASCII 'M' for mintty.)
|
||||||
|
if (STRNCMP(tp + extra - 3, "77;", 3) == 0)
|
||||||
|
is_mintty = TRUE;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* if xterm version >= 141 try to get termcap codes */
|
/* if xterm version >= 141 try to get termcap codes */
|
||||||
@ -4751,8 +4757,9 @@ check_termcode(
|
|||||||
{
|
{
|
||||||
# ifdef FEAT_MOUSE_SGR
|
# ifdef FEAT_MOUSE_SGR
|
||||||
/* Xterm version 277 supports SGR. Also support
|
/* Xterm version 277 supports SGR. Also support
|
||||||
* Terminal.app and iTerm2. */
|
* Terminal.app, iTerm2 and mintty. */
|
||||||
if (version >= 277 || is_iterm2 || is_mac_terminal)
|
if (version >= 277 || is_iterm2 || is_mac_terminal
|
||||||
|
|| is_mintty)
|
||||||
set_option_value((char_u *)"ttym", 0L,
|
set_option_value((char_u *)"ttym", 0L,
|
||||||
(char_u *)"sgr", 0);
|
(char_u *)"sgr", 0);
|
||||||
else
|
else
|
||||||
|
@ -792,6 +792,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 */
|
||||||
|
/**/
|
||||||
|
566,
|
||||||
/**/
|
/**/
|
||||||
565,
|
565,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user