Skip to content
Myr

Fix double-click on light renderer

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent ec471a5 · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:src/tui/light.go+2 added-1 removed
586 unmodified lines
587 r.clicks = [][2]int{{x, y}}588 }589 r.prevDownTime = now590 } else {591 if len(r.clicks) > 1 && r.clicks[0][0] == r.clicks[1][0] && r.clicks[0][1] == r.clicks[1][1] &&591 n := len(r.clicks)592 if len(r.clicks) > 1 && r.clicks[n-2][0] == r.clicks[n-1][0] && r.clicks[n-2][1] == r.clicks[n-1][1] &&593 time.Since(r.prevDownTime) < doubleClickDuration {594 double = true595 if double {596 r.clicks = [][2]int{}
439 unmodified lines