# HG changeset patch # User Bram Moolenaar # Date 1350778224 -7200 # Node ID 4ffb6f9b58e0b51923fe6a71e6af158b6e3f7864 # Parent 1418104f039a35eba6a3e2eb7902aba5a3157a25 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) diff --git a/src/term.c b/src/term.c --- a/src/term.c +++ b/src/term.c @@ -4079,24 +4079,22 @@ check_termcode(max_offset, buf, bufsize, if (tp[1 + (tp[0] != CSI)] == '>' && j == 2) { + /* Only set 'ttymouse' automatically if it was not set + * by the user already. */ + if (!option_was_set((char_u *)"ttym")) + { # ifdef TTYM_SGR - if (extra >= 277 -# ifdef TTYM_URXVT - && ttym_flags != TTYM_URXVT -# endif - ) - set_option_value((char_u *)"ttym", 0L, + if (extra >= 277) + set_option_value((char_u *)"ttym", 0L, (char_u *)"sgr", 0); - else + else # endif - /* if xterm version >= 95 use mouse dragging */ - if (extra >= 95 -# ifdef TTYM_URXVT - && ttym_flags != TTYM_URXVT -# endif - ) - set_option_value((char_u *)"ttym", 0L, + /* if xterm version >= 95 use mouse dragging */ + if (extra >= 95) + set_option_value((char_u *)"ttym", 0L, (char_u *)"xterm2", 0); + } + /* if xterm version >= 141 try to get termcap codes */ if (extra >= 141) { diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -720,6 +720,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 699, +/**/ 698, /**/ 697,