0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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)
This commit is contained in:
Bram Moolenaar
2019-05-02 20:24:12 +02:00
parent 36d502225c
commit bb7e1b4ba8
2 changed files with 6 additions and 3 deletions

View 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 */

View File

@@ -767,6 +767,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1246,
/**/
1245,
/**/