mirror of
https://github.com/zyedidia/micro
synced 2024-11-05 17:41:24 +00:00
Only copy messages if there is a mouse left click (not any mouse event)
This commit is contained in:
parent
77b6c2c486
commit
d32d373bff
1 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue