1. Richo Healey
  2. vim

Commits

Bram Moolenaar  committed c75a8d2

updated for version 7.3.405
Problem: When xterm gets back the function keys it may delete the urxvt
mouse termcap code.
Solution: Check for the whole code, not just the start. (Egmont Koblinger)

  • Participants
  • Parent commits 3ab7f7a
  • Branches default
  • Tags v7-3-405

Comments (0)

Files changed (4)

File src/keymap.h

View file
  • Ignore whitespace
 #define K_DEC_MOUSE	TERMCAP2KEY(KS_DEC_MOUSE, KE_FILLER)
 #define K_JSBTERM_MOUSE	TERMCAP2KEY(KS_JSBTERM_MOUSE, KE_FILLER)
 #define K_PTERM_MOUSE	TERMCAP2KEY(KS_PTERM_MOUSE, KE_FILLER)
+#define K_URXVT_MOUSE	TERMCAP2KEY(KS_URXVT_MOUSE, KE_FILLER)
 
 #define K_SELECT	TERMCAP2KEY(KS_SELECT, KE_FILLER)
 #define K_TEAROFF	TERMCAP2KEY(KS_TEAROFF, KE_FILLER)

File src/misc2.c

View file
  • Ignore whitespace
     {'<',		(char_u *)"lt"},
 
     {K_MOUSE,		(char_u *)"Mouse"},
+#ifdef FEAT_MOUSE_NET
     {K_NETTERM_MOUSE,	(char_u *)"NetMouse"},
+#endif
+#ifdef FEAT_MOUSE_DEC
     {K_DEC_MOUSE,	(char_u *)"DecMouse"},
+#endif
+#ifdef FEAT_MOUSE_JSB
     {K_JSBTERM_MOUSE,	(char_u *)"JsbMouse"},
+#endif
+#ifdef FEAT_MOUSE_PTERM
     {K_PTERM_MOUSE,	(char_u *)"PtermMouse"},
+#endif
+#ifdef FEAT_MOUSE_URXVT
+    {K_URXVT_MOUSE,	(char_u *)"UrxvtMouse"},
+#endif
     {K_LEFTMOUSE,	(char_u *)"LeftMouse"},
     {K_LEFTMOUSE_NM,	(char_u *)"LeftMouseNM"},
     {K_LEFTDRAG,	(char_u *)"LeftDrag"},

File src/term.c

View file
  • Ignore whitespace
     char_u	*src;
 {
     int		i;
-    int		slen;
+    int		slen = STRLEN(src);
 
     for (i = 0; i < tc_len; ++i)
     {
-	slen = termcodes[i].len;
-	if (slen > 1 && STRNCMP(termcodes[i].code, src, (size_t)slen) == 0)
+	if (slen == termcodes[i].len
+			&& STRNCMP(termcodes[i].code, src, (size_t)slen) == 0)
 	    return i;
     }
     return -1;

File src/version.c

View file
  • Ignore whitespace
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    405,
+/**/
     404,
 /**/
     403,