summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-02 20:24:12 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-02 20:24:12 +0200
commitbb7e1b4ba82eaa6f8c7a59f1314056e3c404437a (patch)
tree89d06c14909a7e442d46d69ce86f3161741aaf9b /src/term.c
parent36d502225c3ec5e8b30771d58ee20171ce564b2f (diff)
downloadvim-git-bb7e1b4ba82eaa6f8c7a59f1314056e3c404437a.tar.gz
patch 8.1.1246: cannot handle negative mouse coordinate from urxvtv8.1.1246
Problem: Cannot handle negative mouse coordinate from urxvt. Solution: Accept '-' where a digit is expected. (Vincent Vinel, closes #4326)
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c
index af7d27c69..6fa519b4f 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4551,10 +4551,11 @@ check_termcode(
continue; /* no match */
else
{
- /* Skip over the digits, the final char must
- * follow. */
+ // Skip over the digits, the final char must
+ // follow. URXVT can use a negative value, thus
+ // also accept '-'.
for (j = slen - 2; j < len && (isdigit(tp[j])
- || tp[j] == ';'); ++j)
+ || tp[j] == '-' || tp[j] == ';'); ++j)
;
++j;
if (len < j) /* got a partial sequence */