Fix that SGR style mouse handler has off-by-one problem
cf. https://github.com/tats/w3m/issues/5 Origin: https://gist.github.com/ttdoda/30c189a63d483beeb207 Bug: https://sourceforge.net/p/w3m/patches/65/
This commit is contained in:
committed by
Tatsuya Kinoshita
parent
ea4fe13370
commit
dd054480d7
@@ -5561,6 +5561,7 @@ DEFUN(sgrmouse, SGRMOUSE, "SGR 1006 mouse operation")
|
|||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
} while (1);
|
} while (1);
|
||||||
|
if (x>0) x--;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
c = getch();
|
c = getch();
|
||||||
@@ -5574,6 +5575,7 @@ DEFUN(sgrmouse, SGRMOUSE, "SGR 1006 mouse operation")
|
|||||||
} else
|
} else
|
||||||
return;
|
return;
|
||||||
} while (1);
|
} while (1);
|
||||||
|
if (y>0) y--;
|
||||||
|
|
||||||
if (x < 0 || x >= COLS || y < 0 || y > LASTLINE)
|
if (x < 0 || x >= COLS || y < 0 || y > LASTLINE)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user