fix #1839: decrement mouse row and col

- regression by 04c0658024
This commit is contained in:
glebtv 2015-01-24 03:15:53 +03:00 committed by Justin M. Keyes
parent 65adcc2699
commit c88ad49cf1

View File

@ -3245,11 +3245,11 @@ int check_termcode(int max_offset, char_u *buf, int bufsize, int *buflen)
if (key_name[0] == KS_SGR_MOUSE)
mouse_code += 32;
mouse_col = getdigits_int(&p);
mouse_col = getdigits_int(&p) - 1;
if (*p++ != ';')
return -1;
mouse_row = getdigits_int(&p);
mouse_row = getdigits_int(&p) - 1;
if (key_name[0] == KS_SGR_MOUSE && *p == 'm')
mouse_code |= MOUSE_RELEASE;
else if (*p != 'M')