]> granicus.if.org Git - vim/commitdiff
patch 8.1.1246: cannot handle negative mouse coordinate from urxvt v8.1.1246
authorBram Moolenaar <Bram@vim.org>
Thu, 2 May 2019 18:24:12 +0000 (20:24 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 2 May 2019 18:24:12 +0000 (20:24 +0200)
Problem:    Cannot handle negative mouse coordinate from urxvt.
Solution:   Accept '-' where a digit is expected. (Vincent Vinel,
            closes #4326)

src/term.c
src/version.c

index af7d27c6944a71f67dcba08ec6d1d07bf47c5439..6fa519b4f81c4f856c2b86d2a709fad91e15cbc9 100644 (file)
@@ -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 */
index 96f64eb8d9cb6d07aba7069b4b8c81c05bae1521..0e7f3f5d2db6fd6aca4ef265802c80be7f9026ef 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1246,
 /**/
     1245,
 /**/