diff options
author | Bram Moolenaar <bram@vim.org> | 2012-10-21 02:10:24 +0200 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2012-10-21 02:10:24 +0200 |
commit | eb87562f099a5cd051f84a8089e49f512a6cf73b (patch) | |
tree | abc76c06c779fd8bea78d4a7c4d99c67bf6b2e07 | |
parent | 6070f134be8be00f9e9b19fb9417a5d3cb9ad8cd (diff) | |
download | vim-7.3.699.tar.gz |
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)
-rw-r--r-- | src/term.c | 26 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 14 insertions, 14 deletions
@@ -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) { diff --git a/src/version.c b/src/version.c index 6613e50d..e0404d0b 100644 --- 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, |