]> git.neil.brown.name Git - edlib.git/commitdiff
Always attach a renderer as a leaf.
authorNeilBrown <neil@brown.name>
Mon, 23 Nov 2015 04:54:19 +0000 (15:54 +1100)
committerNeilBrown <neil@brown.name>
Mon, 23 Nov 2015 04:54:19 +0000 (15:54 +1100)
This always makes sense, and we don't always easliy have the leaf
available.

Signed-off-by: NeilBrown <neil@brown.name>
core-pane.c

index fbd64f36dbde511c4fb2a775cdbb11f47c29106a..f02c38e768c8c51b45a9a2bf5bc726f840e672ff 100644 (file)
@@ -369,9 +369,12 @@ int render_attach(char *name, struct pane *parent)
 {
        char buf[100];
        struct cmd_info ci = {0};
-       struct point **ptp = pane_point(parent);
+       struct point **ptp;
        int ret;
 
+       /* always attach a renderer as a leaf */
+       parent = pane_final_child(parent);
+       ptp = pane_point(parent);
        if (!ptp)
                return 0;
        if (!name)