diff src/term.c @ 16485:b870146e09e1 v8.1.1246

patch 8.1.1246: cannot handle negative mouse coordinate from urxvt commit https://github.com/vim/vim/commit/bb7e1b4ba82eaa6f8c7a59f1314056e3c404437a Author: Bram Moolenaar <Bram@vim.org> 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)
author Bram Moolenaar <Bram@vim.org>
date Thu, 02 May 2019 20:30:07 +0200
parents 7ae2396cef62
children 899db156cce3
line wrap: on
line diff
--- 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 */