     [ pane-nl ] do-pane-stream ;
 
 M: pane-stream stream-write1
-    [ current>> pane-write1 ] do-pane-stream ;
+    [ pane-write1 ] do-pane-stream ;
 
 : split-pane ( str quot: ( str -- ) -- )
     '[

M: filter-writer write-gadget
    stream>> write-gadget ;

M: pane-stream write-gadget ( gadget pane-stream -- )
    pane>> current>> swap add-gadget drop ;

M: style-stream write-gadget
    stream>> write-gadget ;

: print-gadget ( gadget stream -- )
    [ write-gadget ] [ nip stream-nl ] 2bi ;

    output current input last-line prototype scrolls?
    selection-color caret mark selecting? ;

TUPLE: pane-stream pane parent ;
INSTANCE: pane-stream output-stream

: <pane-stream> ( pane -- pane-stream )
    f pane-stream boa ;

M: pane-stream stream-element-type drop +character+ ;

DEFER: write-gadget

<PRIVATE

