summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-01-20 17:15:51 +0100
committerBram Moolenaar <Bram@vim.org>2012-01-20 17:15:51 +0100
commit5af7d712763904e2018efb0485c520cd12935d54 (patch)
tree0d6332c7655d411585793a8d552bea25fe79f4df /src/term.c
parent6d6cec83750a4158044a25696e8ae69eda1c3798 (diff)
downloadvim-git-5af7d712763904e2018efb0485c520cd12935d54.tar.gz
updated for version 7.3.405v7.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)
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c
index f40d39a06..93d325e43 100644
--- a/src/term.c
+++ b/src/term.c
@@ -5252,12 +5252,12 @@ find_term_bykeys(src)
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;