tats/w3m

SGR style mouse handler has off-by-one problem

Closed this issue · 4 comments

@msmhrt reported 120_sgrmouse.patch has off-by-one issue.
The arguments of process_mouse() should be mouse position in (0, 0) based coordinate system.
But 120_sgrmouse.patch passes (1, 1) based one.
@ttdoda wrote revised patch for this problem. Please check it.
https://gist.github.com/ttdoda/30c189a63d483beeb207
https://gist.github.com/ttdoda/b4e226494fb847e11b66

tats commented

Merged. Thank you.

tats commented

Also, I'll catch up with the next patch for menu.c.

Any comments welcome. Thank you.

@tats It works for me. I think this code has no risk although it can cause integer overflow.

tats commented

@saitoha @ttdoda Merged w3m-sgr-style-menu.diff. Thanks for your contributions.