Remove unnecessary check for selection

This commit is contained in:
Zachary Yedidia 2016-04-30 16:56:48 -04:00
parent 539d4b1167
commit 012668146c

View file

@ -278,12 +278,9 @@ func (v *View) HandleEvent(event tcell.Event) {
switch button {
case tcell.Button1:
// Left click
origX, origY := v.cursor.x, v.cursor.y
if v.mouseReleased && !e.HasMotion() {
v.MoveToMouseClick(x, y)
if (time.Since(v.lastClickTime)/time.Millisecond < doubleClickThreshold) &&
(origX == v.cursor.x && origY == v.cursor.y) {
if time.Since(v.lastClickTime)/time.Millisecond < doubleClickThreshold {
if v.doubleClick {
// Triple click
v.lastClickTime = time.Now()