aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIWAMOTO Kouichi <sue@iwmt.org>2015-08-04 21:35:09 +0000
committerTatsuya Kinoshita <tats@debian.org>2015-08-04 21:35:09 +0000
commitdd054480d7c73d63cb9e8d459063fd2dd0266081 (patch)
tree2a3b77eebdc865c849fc7026b0232dfe8a4183db
parentUpdate ChangeLog (diff)
downloadw3m-dd054480d7c73d63cb9e8d459063fd2dd0266081.tar.gz
w3m-dd054480d7c73d63cb9e8d459063fd2dd0266081.zip
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/
Diffstat (limited to '')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index 9cac333..7c5780c 100644
--- a/main.c
+++ b/main.c
@@ -5561,6 +5561,7 @@ DEFUN(sgrmouse, SGRMOUSE, "SGR 1006 mouse operation")
else
return;
} while (1);
+ if (x>0) x--;
do {
c = getch();
@@ -5574,6 +5575,7 @@ DEFUN(sgrmouse, SGRMOUSE, "SGR 1006 mouse operation")
} else
return;
} while (1);
+ if (y>0) y--;
if (x < 0 || x >= COLS || y < 0 || y > LASTLINE)
return;