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)
diff --git a/src/keymap.h b/src/keymap.h
index 8ec0093..4706dfe 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -411,6 +411,7 @@
#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)
diff --git a/src/misc2.c b/src/misc2.c
index 22d1fb4..00d1ff4 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -2416,10 +2416,21 @@
{'<', (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"},
diff --git a/src/term.c b/src/term.c
index f40d39a..93d325e 100644
--- a/src/term.c
+++ b/src/term.c
@@ -5252,12 +5252,12 @@
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;
diff --git a/src/version.c b/src/version.c
index e2a2fa2..73bb3ab 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 405,
+/**/
404,
/**/
403,