fixes #92 sgr mouse report off by one error

This commit is contained in:
Zachary Yedidia 2016-04-18 17:32:02 -04:00 committed by Garrett D'Amore
parent 815826d8a7
commit 0dd71be383
1 changed files with 2 additions and 2 deletions

View File

@ -881,7 +881,7 @@ func (t *tScreen) parseSgrMouse(buf *bytes.Buffer) (bool, bool) {
btn, val = val, 0
neg, dig, state = false, false, 4
case 4:
x, val = val, 0
x, val = val-1, 0
neg, dig, state = false, false, 5
default:
return false, false
@ -894,7 +894,7 @@ func (t *tScreen) parseSgrMouse(buf *bytes.Buffer) (bool, bool) {
if neg {
val = -val
}
y = val
y = val - 1
// We don't care about the motion bit
btn &^= 32