summaryrefslogtreecommitdiff
path: root/find.go
diff options
context:
space:
mode:
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()
+}