simplified bitwise math to determine if mouse scrolling

This commit is contained in:
Matthew Roseman 2023-03-27 09:45:20 -04:00 committed by Garrett D'Amore
parent b9a2bbda10
commit a92c043b0b
1 changed files with 1 additions and 1 deletions

View File

@ -1346,7 +1346,7 @@ func (t *tScreen) parseSgrMouse(buf *bytes.Buffer, evs *[]Event) (bool, bool) {
y = val - 1
motion = (btn & 32) != 0
scroll = (btn & 0x43) == 0x40 || (btn & 0x43) == 0x41
scroll = (btn & 0x42) == 0x40
btn &^= 32
if b[i] == 'm' {
// mouse release, clear all buttons