summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-10-21 02:10:24 +0200
committerBram Moolenaar <Bram@vim.org>2012-10-21 02:10:24 +0200
commitbffa06ddb8d25081dea48274aff2cb65ebef6ced (patch)
treef56e07220acb88b8d9600f92e4e35836c968098f /src/term.c
parent003d14a26771bf7d2c05013cd2fd9d2622f373b9 (diff)
downloadvim-git-bffa06ddb8d25081dea48274aff2cb65ebef6ced.tar.gz
updated for version 7.3.699v7.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)
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/term.c b/src/term.c
index 38fc89b69..3efa7a7a1 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4079,24 +4079,22 @@ check_termcode(max_offset, buf, bufsize, buflen)
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
-# endif
- /* if xterm version >= 95 use mouse dragging */
- if (extra >= 95
-# ifdef TTYM_URXVT
- && ttym_flags != TTYM_URXVT
+ else
# 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)
{