summaryrefslogtreecommitdiff
path: root/find.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-08 18:03:11 -0600
committerJeff Carr <[email protected]>2025-02-08 18:03:11 -0600
commit82ed6874601ee09b39768747aa04b1b22722db5d (patch)
tree969ad2eac9dce355b80af64e94a1aaaabe8b31aa /find.go
parent5a84456c7aa416ed228a809be28137802f35b6e0 (diff)
mouse drag was not always right
Diffstat (limited to 'find.go')
-rw-r--r--find.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/find.go b/find.go
index 7ab3a4e..2fa7f89 100644
--- a/find.go
+++ b/find.go
@@ -200,3 +200,13 @@ func ctrlDown(g *gocui.Gui, v *gocui.View) error {
log.Info("todo: clicked with ctrlDown")
return nil
}
+
+func (tk *guiWidget) findParentWindow() *guiWidget {
+ if tk.node.WidgetType == widget.Window {
+ return tk
+ }
+ if tk.parent == nil {
+ return nil
+ }
+ return tk.parent.findParentWindow()
+}