mirror of
https://github.com/zyedidia/micro
synced 2024-11-05 17:41:24 +00:00
Remove unnecessary check for selection
This commit is contained in:
parent
539d4b1167
commit
012668146c
1 changed files with 1 additions and 4 deletions
|
@ -278,12 +278,9 @@ func (v *View) HandleEvent(event tcell.Event) {
|
||||||
switch button {
|
switch button {
|
||||||
case tcell.Button1:
|
case tcell.Button1:
|
||||||
// Left click
|
// Left click
|
||||||
origX, origY := v.cursor.x, v.cursor.y
|
|
||||||
|
|
||||||
if v.mouseReleased && !e.HasMotion() {
|
if v.mouseReleased && !e.HasMotion() {
|
||||||
v.MoveToMouseClick(x, y)
|
v.MoveToMouseClick(x, y)
|
||||||
if (time.Since(v.lastClickTime)/time.Millisecond < doubleClickThreshold) &&
|
if time.Since(v.lastClickTime)/time.Millisecond < doubleClickThreshold {
|
||||||
(origX == v.cursor.x && origY == v.cursor.y) {
|
|
||||||
if v.doubleClick {
|
if v.doubleClick {
|
||||||
// Triple click
|
// Triple click
|
||||||
v.lastClickTime = time.Now()
|
v.lastClickTime = time.Now()
|
||||||
|
|
Loading…
Reference in a new issue