mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-30 02:54:42 +00:00
Possible fix for elementary mouse issue
This commit is contained in:
parent
bbda5d59d0
commit
15dbf37154
1 changed files with 2 additions and 2 deletions
|
|
@ -528,7 +528,7 @@ func (v *View) HandleEvent(event tcell.Event) {
|
|||
origX, origY := v.cursor.x, v.cursor.y
|
||||
v.MoveToMouseClick(x, y)
|
||||
|
||||
if v.mouseReleased {
|
||||
if v.mouseReleased && !e.HasMotion() {
|
||||
if (time.Since(v.lastClickTime)/time.Millisecond < doubleClickThreshold) &&
|
||||
(origX == v.cursor.x && origY == v.cursor.y) {
|
||||
if v.doubleClick {
|
||||
|
|
@ -557,6 +557,7 @@ func (v *View) HandleEvent(event tcell.Event) {
|
|||
v.cursor.curSelection[0] = loc
|
||||
v.cursor.curSelection[1] = loc
|
||||
}
|
||||
v.mouseReleased = false
|
||||
} else {
|
||||
if v.tripleClick {
|
||||
v.cursor.AddLineToSelection()
|
||||
|
|
@ -566,7 +567,6 @@ func (v *View) HandleEvent(event tcell.Event) {
|
|||
v.cursor.curSelection[1] = v.cursor.Loc()
|
||||
}
|
||||
}
|
||||
v.mouseReleased = false
|
||||
case tcell.ButtonNone:
|
||||
// Mouse event with no click
|
||||
if !v.mouseReleased {
|
||||
|
|
|
|||
Loading…
Reference in a new issue