summaryrefslogtreecommitdiff
path: root/eventMouseMove.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventMouseMove.go')
-rw-r--r--eventMouseMove.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/eventMouseMove.go b/eventMouseMove.go
index eb6c2ee..2c70881 100644
--- a/eventMouseMove.go
+++ b/eventMouseMove.go
@@ -22,20 +22,29 @@ import (
// this function uses the mouse position to highlight & unhighlight things
// this is run every time the user moves the mouse over the terminal window
func mouseMove(g *gocui.Gui) {
- w, h := g.MousePosition()
me.ok = true // this tells init() it's okay to work with gocui
-
+ // very useful for debugging in the past. also, just fun
if me.supermouse {
+ w, h := g.MousePosition()
for _, tk := range findByXY(w, h) {
s := fmt.Sprintf("SM (%3d,%3d)", w, h)
tk.dumpWidget(s)
}
}
+ /*
+ if time.Since(me.mouse.down) < me.mouse.clicktime {
+ log.Info("not yet")
+ return
+ }
+ */
+
+ w, h := g.MousePosition()
// toggle off all highlight vies except for whatever is under the mouse
for _, view := range g.Views() {
view.Highlight = false
}
+
if v, err := g.ViewByPosition(w, h); err == nil {
v.Highlight = true
}