Only copy messages if there is a mouse left click (not any mouse event)

This commit is contained in:
Zachary Yedidia 2016-06-21 17:54:36 -04:00
parent 77b6c2c486
commit d32d373bff

View file

@ -278,11 +278,13 @@ func main() {
switch e := event.(type) {
case *tcell.EventMouse:
_, h := screen.Size()
_, y := e.Position()
if y == h-1 && messenger.message != "" {
clipboard.WriteAll(messenger.message)
continue
if e.Buttons() == tcell.Button1 {
_, h := screen.Size()
_, y := e.Position()
if y == h-1 && messenger.message != "" {
clipboard.WriteAll(messenger.message)
continue
}
}
}