Karsten Hopp d618c2
To: vim_dev@googlegroups.com
Karsten Hopp d618c2
Subject: Patch 7.3.405
Karsten Hopp d618c2
Fcc: outbox
Karsten Hopp d618c2
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp d618c2
Mime-Version: 1.0
Karsten Hopp d618c2
Content-Type: text/plain; charset=UTF-8
Karsten Hopp d618c2
Content-Transfer-Encoding: 8bit
Karsten Hopp d618c2
------------
Karsten Hopp d618c2
Karsten Hopp d618c2
Patch 7.3.405
Karsten Hopp d618c2
Problem:    When xterm gets back the function keys it may delete the urxvt
Karsten Hopp d618c2
	    mouse termcap code.
Karsten Hopp d618c2
Solution:   Check for the whole code, not just the start. (Egmont Koblinger)
Karsten Hopp d618c2
Files:	    src/keymap.h, src/misc2.c, src/term.c
Karsten Hopp d618c2
Karsten Hopp d618c2
Karsten Hopp d618c2
*** ../vim-7.3.404/src/keymap.h	2011-10-20 21:09:25.000000000 +0200
Karsten Hopp d618c2
--- src/keymap.h	2012-01-20 16:35:43.000000000 +0100
Karsten Hopp d618c2
***************
Karsten Hopp d618c2
*** 411,416 ****
Karsten Hopp d618c2
--- 411,417 ----
Karsten Hopp d618c2
  #define K_DEC_MOUSE	TERMCAP2KEY(KS_DEC_MOUSE, KE_FILLER)
Karsten Hopp d618c2
  #define K_JSBTERM_MOUSE	TERMCAP2KEY(KS_JSBTERM_MOUSE, KE_FILLER)
Karsten Hopp d618c2
  #define K_PTERM_MOUSE	TERMCAP2KEY(KS_PTERM_MOUSE, KE_FILLER)
Karsten Hopp d618c2
+ #define K_URXVT_MOUSE	TERMCAP2KEY(KS_URXVT_MOUSE, KE_FILLER)
Karsten Hopp d618c2
  
Karsten Hopp d618c2
  #define K_SELECT	TERMCAP2KEY(KS_SELECT, KE_FILLER)
Karsten Hopp d618c2
  #define K_TEAROFF	TERMCAP2KEY(KS_TEAROFF, KE_FILLER)
Karsten Hopp d618c2
*** ../vim-7.3.404/src/misc2.c	2012-01-10 22:26:12.000000000 +0100
Karsten Hopp d618c2
--- src/misc2.c	2012-01-20 16:38:27.000000000 +0100
Karsten Hopp d618c2
***************
Karsten Hopp d618c2
*** 2416,2425 ****
Karsten Hopp d618c2
--- 2416,2436 ----
Karsten Hopp d618c2
      {'<',		(char_u *)"lt"},
Karsten Hopp d618c2
  
Karsten Hopp d618c2
      {K_MOUSE,		(char_u *)"Mouse"},
Karsten Hopp d618c2
+ #ifdef FEAT_MOUSE_NET
Karsten Hopp d618c2
      {K_NETTERM_MOUSE,	(char_u *)"NetMouse"},
Karsten Hopp d618c2
+ #endif
Karsten Hopp d618c2
+ #ifdef FEAT_MOUSE_DEC
Karsten Hopp d618c2
      {K_DEC_MOUSE,	(char_u *)"DecMouse"},
Karsten Hopp d618c2
+ #endif
Karsten Hopp d618c2
+ #ifdef FEAT_MOUSE_JSB
Karsten Hopp d618c2
      {K_JSBTERM_MOUSE,	(char_u *)"JsbMouse"},
Karsten Hopp d618c2
+ #endif
Karsten Hopp d618c2
+ #ifdef FEAT_MOUSE_PTERM
Karsten Hopp d618c2
      {K_PTERM_MOUSE,	(char_u *)"PtermMouse"},
Karsten Hopp d618c2
+ #endif
Karsten Hopp d618c2
+ #ifdef FEAT_MOUSE_URXVT
Karsten Hopp d618c2
+     {K_URXVT_MOUSE,	(char_u *)"UrxvtMouse"},
Karsten Hopp d618c2
+ #endif
Karsten Hopp d618c2
      {K_LEFTMOUSE,	(char_u *)"LeftMouse"},
Karsten Hopp d618c2
      {K_LEFTMOUSE_NM,	(char_u *)"LeftMouseNM"},
Karsten Hopp d618c2
      {K_LEFTDRAG,	(char_u *)"LeftDrag"},
Karsten Hopp d618c2
*** ../vim-7.3.404/src/term.c	2011-12-01 20:59:16.000000000 +0100
Karsten Hopp d618c2
--- src/term.c	2012-01-20 16:50:41.000000000 +0100
Karsten Hopp d618c2
***************
Karsten Hopp d618c2
*** 5252,5263 ****
Karsten Hopp d618c2
      char_u	*src;
Karsten Hopp d618c2
  {
Karsten Hopp d618c2
      int		i;
Karsten Hopp d618c2
!     int		slen;
Karsten Hopp d618c2
  
Karsten Hopp d618c2
      for (i = 0; i < tc_len; ++i)
Karsten Hopp d618c2
      {
Karsten Hopp d618c2
! 	slen = termcodes[i].len;
Karsten Hopp d618c2
! 	if (slen > 1 && STRNCMP(termcodes[i].code, src, (size_t)slen) == 0)
Karsten Hopp d618c2
  	    return i;
Karsten Hopp d618c2
      }
Karsten Hopp d618c2
      return -1;
Karsten Hopp d618c2
--- 5252,5263 ----
Karsten Hopp d618c2
      char_u	*src;
Karsten Hopp d618c2
  {
Karsten Hopp d618c2
      int		i;
Karsten Hopp d618c2
!     int		slen = STRLEN(src);
Karsten Hopp d618c2
  
Karsten Hopp d618c2
      for (i = 0; i < tc_len; ++i)
Karsten Hopp d618c2
      {
Karsten Hopp d618c2
! 	if (slen == termcodes[i].len
Karsten Hopp d618c2
! 			&& STRNCMP(termcodes[i].code, src, (size_t)slen) == 0)
Karsten Hopp d618c2
  	    return i;
Karsten Hopp d618c2
      }
Karsten Hopp d618c2
      return -1;
Karsten Hopp d618c2
*** ../vim-7.3.404/src/version.c	2012-01-20 14:32:22.000000000 +0100
Karsten Hopp d618c2
--- src/version.c	2012-01-20 16:59:47.000000000 +0100
Karsten Hopp d618c2
***************
Karsten Hopp d618c2
*** 716,717 ****
Karsten Hopp d618c2
--- 716,719 ----
Karsten Hopp d618c2
  {   /* Add new patch number below this line */
Karsten Hopp d618c2
+ /**/
Karsten Hopp d618c2
+     405,
Karsten Hopp d618c2
  /**/
Karsten Hopp d618c2
Karsten Hopp d618c2
-- 
Karsten Hopp d618c2
"The future's already arrived - it's just not evenly distributed yet."
Karsten Hopp d618c2
		-- William Gibson
Karsten Hopp d618c2
Karsten Hopp d618c2
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp d618c2
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp d618c2
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp d618c2
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///