diff options
Diffstat (limited to 'eventMouseMove.go')
| -rw-r--r-- | eventMouseMove.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eventMouseMove.go b/eventMouseMove.go index a88f64c..b9b34fd 100644 --- a/eventMouseMove.go +++ b/eventMouseMove.go @@ -34,6 +34,7 @@ func mouseMove(g *gocui.Gui) { } if msgMouseDown { + log.Info("msgMouseDown == true") // plugin will segfault if you don't keep this inside a check for msgMouseDown // don't move this code out of here for _, tk := range findByXY(w, h) { @@ -41,6 +42,10 @@ func mouseMove(g *gocui.Gui) { tk.moveNew(g) return } + if tk.node.WidgetType == widget.Label { + tk.moveNew(g) + return + } } } @@ -59,6 +64,7 @@ func mouseMove(g *gocui.Gui) { // this is how the window gets dragged around func (tk *guiWidget) moveNew(g *gocui.Gui) { mx, my := g.MousePosition() + tk.dumpWidget("moveNew() on " + tk.cuiName) g.SetView("msg", mx-xOffset, my-yOffset, mx-xOffset+outputW, my-yOffset+outputH+me.FramePadH, 0) me.startOutputW = mx - xOffset me.startOutputH = my - yOffset |
