To: vim_dev@googlegroups.com
Subject: Patch 7.3.699
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 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)
Files: src/term.c
*** ../vim-7.3.698/src/term.c 2012-08-29 16:26:01.000000000 +0200
--- src/term.c 2012-10-21 02:07:25.000000000 +0200
***************
*** 4079,4102 ****
if (tp[1 + (tp[0] != CSI)] == '>' && j == 2)
{
# ifdef TTYM_SGR
! if (extra >= 277
! # ifdef TTYM_URXVT
! && ttym_flags != TTYM_URXVT
! # endif
! )
! 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
! # endif
! )
! set_option_value((char_u *)"ttym", 0L,
(char_u *)"xterm2", 0);
/* if xterm version >= 141 try to get termcap codes */
if (extra >= 141)
{
--- 4079,4100 ----
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)
! set_option_value((char_u *)"ttym", 0L,
(char_u *)"sgr", 0);
! else
# endif
! /* 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)
{
*** ../vim-7.3.698/src/version.c 2012-10-21 01:46:56.000000000 +0200
--- src/version.c 2012-10-21 02:09:17.000000000 +0200
***************
*** 721,722 ****
--- 721,724 ----
{ /* Add new patch number below this line */
+ /**/
+ 699,
/**/
--
Never under any circumstances take a sleeping pill
and a laxative on the same night.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///