# HG changeset patch # User Bram Moolenaar # Date 1556821807 -7200 # Node ID b870146e09e1feccf31b43711f67180450a6eb79 # Parent 3a07495a0806bb3e309dbea0e10484b93fb23112 patch 8.1.1246: cannot handle negative mouse coordinate from urxvt commit https://github.com/vim/vim/commit/bb7e1b4ba82eaa6f8c7a59f1314056e3c404437a Author: Bram Moolenaar Date: Thu May 2 20:24:12 2019 +0200 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 --- 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 */ diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1246, +/**/ 1245, /**/ 1244,