Skip to content

Commit 7e45de3

Browse files
committed
updated for version 7.3.699
Problem: When 'ttymouse' is set to "sgr" manually, it is overruled by automatic detection. Solution: Do not use automatic detection when 'ttymouse' was set manually. (Hayaki Saito)
1 parent 35189ed commit 7e45de3

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/term.c

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4079,24 +4079,22 @@ check_termcode(max_offset, buf, bufsize, buflen)
40794079

40804080
if (tp[1 + (tp[0] != CSI)] == '>' && j == 2)
40814081
{
4082+
/* Only set 'ttymouse' automatically if it was not set
4083+
* by the user already. */
4084+
if (!option_was_set((char_u *)"ttym"))
4085+
{
40824086
# ifdef TTYM_SGR
4083-
if (extra >= 277
4084-
# ifdef TTYM_URXVT
4085-
&& ttym_flags != TTYM_URXVT
4086-
# endif
4087-
)
4088-
set_option_value((char_u *)"ttym", 0L,
4087+
if (extra >= 277)
4088+
set_option_value((char_u *)"ttym", 0L,
40894089
(char_u *)"sgr", 0);
4090-
else
4091-
# endif
4092-
/* if xterm version >= 95 use mouse dragging */
4093-
if (extra >= 95
4094-
# ifdef TTYM_URXVT
4095-
&& ttym_flags != TTYM_URXVT
4090+
else
40964091
# endif
4097-
)
4098-
set_option_value((char_u *)"ttym", 0L,
4092+
/* if xterm version >= 95 use mouse dragging */
4093+
if (extra >= 95)
4094+
set_option_value((char_u *)"ttym", 0L,
40994095
(char_u *)"xterm2", 0);
4096+
}
4097+
41004098
/* if xterm version >= 141 try to get termcap codes */
41014099
if (extra >= 141)
41024100
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ static char *(features[]) =
719719

720720
static int included_patches[] =
721721
{ /* Add new patch number below this line */
722+
/**/
723+
699,
722724
/**/
723725
698,
724726
/**/

0 commit comments

Comments
 (0)