Mercurial > vim
changeset 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 | 3a07495a0806 |
children | 2a84ef3a5cde |
files | src/term.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
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 */