patch 8.1.1246: cannot handle negative mouse coordinate from urxvt
Problem: Cannot handle negative mouse coordinate from urxvt.
Solution: Accept '-' where a digit is expected. (Vincent Vinel,
closes #4326)
diff --git a/src/term.c b/src/term.c
index af7d27c..6fa519b 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4551,10 +4551,11 @@
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 */