summaryrefslogtreecommitdiffstats
path: root/layout/layout.go
diff options
context:
space:
mode:
Diffstat (limited to 'layout/layout.go')
-rw-r--r--layout/layout.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/layout/layout.go b/layout/layout.go
index 1dbcaa4..b8d3226 100644
--- a/layout/layout.go
+++ b/layout/layout.go
@@ -236,7 +236,6 @@ func countMaxHeight(rs [][]widgetRule) int {
// deepFindProc looks in the UI widget tree for the ProcWidget,
// and returns it if found or nil if not.
func deepFindProc(gs interface{}) *widgets.ProcWidget {
- // FIXME: `procs` layout isn't passing down keystrokes
// Recursive function #1. Recursion is OK here because the number
// of UI elements, even in a very complex UI, is going to be
// relatively small.
@@ -262,6 +261,15 @@ func deepFindProc(gs interface{}) *widgets.ProcWidget {
}
}
}
+ fs2, ok := gs.([][]interface{})
+ if ok {
+ for _, g := range fs2 {
+ v := deepFindProc(g)
+ if v != nil {
+ return v
+ }
+ }
+ }
p, ok := gs.(*widgets.ProcWidget)
if ok {
return p