         add-incremental
     ] [ next-line ] bi ;
 
-: smash-pane ( pane -- gadget ) [ pane-nl ] [ output>> smash-line ] bi ;
+: smash-pane ( pane -- gadget )
+    [ pane-nl ] [ output>> smash-line ] bi ;
 
 : pane-write ( seq pane -- )
     [ pane-nl ] [ current>> stream-write ]


M: pane-stream stream-write-table
    [
        swap [ [ pane>> smash-pane ] map ] map
        styled-grid
    ] dip write-gadget ;


    apply-presentation-style
    nip ;

TUPLE: nested-pane-stream < style-stream parent ;

: new-nested-pane-stream ( style parent class -- stream )
    [ <pane> apply-wrap-style <pane-stream> swap ] 2dip boa ; inline

: unnest-pane-stream ( stream -- child parent )
    [ style>> ] [ stream>> pane>> smash-pane style-pane ] [ parent>> ] tri ;

TUPLE: pane-block-stream < nested-pane-stream ;

