mirror of
https://github.com/rivo/tview.git
synced 2025-04-26 13:49:06 +08:00
Fix operator
This commit is contained in:
parent
9598ca2519
commit
080a8e624e
6
mouse.go
6
mouse.go
@ -78,21 +78,21 @@ func getMouseButtonAction(lastBtn, btn tcell.ButtonMask) MouseAction {
|
||||
func getMouseClickAction(lastAct, action MouseAction) MouseAction {
|
||||
if action&MouseMove == 0 {
|
||||
if action&MouseLeftUp != 0 {
|
||||
if lastAct&(MouseLeftClick&MouseLeftDoubleClick) == 0 {
|
||||
if lastAct&(MouseLeftClick|MouseLeftDoubleClick) == 0 {
|
||||
action |= MouseLeftClick
|
||||
} else if lastAct&MouseLeftDoubleClick == 0 {
|
||||
action |= MouseLeftDoubleClick
|
||||
}
|
||||
}
|
||||
if action&MouseMiddleUp != 0 {
|
||||
if lastAct&(MouseMiddleClick&MouseMiddleDoubleClick) == 0 {
|
||||
if lastAct&(MouseMiddleClick|MouseMiddleDoubleClick) == 0 {
|
||||
action |= MouseMiddleClick
|
||||
} else if lastAct&MouseMiddleDoubleClick == 0 {
|
||||
action |= MouseMiddleDoubleClick
|
||||
}
|
||||
}
|
||||
if action&MouseRightUp != 0 {
|
||||
if lastAct&(MouseRightClick&MouseRightDoubleClick) == 0 {
|
||||
if lastAct&(MouseRightClick|MouseRightDoubleClick) == 0 {
|
||||
action |= MouseRightClick
|
||||
} else if lastAct&MouseRightDoubleClick == 0 {
|
||||
action |= MouseRightDoubleClick
|
||||
|
Loading…
x
Reference in New Issue
Block a user