mirror of https://github.com/gdamore/tcell.git
fixes #92 sgr mouse report off by one error
This commit is contained in:
parent
815826d8a7
commit
0dd71be383
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue