hmm. keep trying to debug dragging views

This commit is contained in:
Jeff Carr 2025-02-01 21:01:03 -06:00
parent 3125bbb258
commit d5d0262013
1 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,7 @@ func mouseMove(g *gocui.Gui) {
// log.Info("msgMouseDown == true") // log.Info("msgMouseDown == true")
// plugin will segfault if you don't keep this inside a check for msgMouseDown // plugin will segfault if you don't keep this inside a check for msgMouseDown
// don't move this code out of here // don't move this code out of here
var found bool = false
for _, tk := range findByXY(w, h) { for _, tk := range findByXY(w, h) {
if tk.node.WidgetType == widget.Stdout { if tk.node.WidgetType == widget.Stdout {
tk.moveNew(g) tk.moveNew(g)
@ -46,6 +47,10 @@ func mouseMove(g *gocui.Gui) {
tk.moveNew(g) tk.moveNew(g)
return return
} }
found = true
}
if !found {
log.Info(fmt.Sprintf("findByXY() empty. nothing to move at (%d,%d)", w, h))
} }
} }