From e8a9582400ac06a11d35830ead53be1130d0d355 Mon Sep 17 00:00:00 2001
From: John Benediktsson <mrjbq7@gmail.com>
Date: Sat, 16 Jul 2016 07:37:15 -0700
Subject: [PATCH] ui.gadgets.panes: fix #1661.

Using old "split-lines" behavior that was needed by documents vocabulary,
rather than the new "string-lines" behavior that doesn't indicate if the
string is newline terminated.
---
 basis/ui/gadgets/panes/panes.factor | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/basis/ui/gadgets/panes/panes.factor b/basis/ui/gadgets/panes/panes.factor
index 20ac7a7415..81ccec06d5 100644
--- a/basis/ui/gadgets/panes/panes.factor
+++ b/basis/ui/gadgets/panes/panes.factor
@@ -1,15 +1,16 @@
 ! Copyright (C) 2005, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs classes combinators destructors fonts
-fry io io.styles kernel locals math.rectangles math.vectors
-memoize models namespaces sequences sorting splitting strings
-ui.baseline-alignment ui.clipboards ui.gadgets
-ui.gadgets.borders ui.gadgets.grid-lines ui.gadgets.grids
-ui.gadgets.icons ui.gadgets.incremental ui.gadgets.labels
-ui.gadgets.menus ui.gadgets.packs ui.gadgets.paragraphs
-ui.gadgets.presentations ui.gadgets.private ui.gadgets.scrollers
-ui.gadgets.tracks ui.gestures ui.images ui.pens.solid ui.render
-ui.theme ui.traverse ;
+USING: accessors assocs classes combinators destructors
+documents.private fonts fry io io.styles kernel locals
+math.rectangles math.vectors memoize models namespaces sequences
+sorting splitting strings ui.baseline-alignment ui.clipboards
+ui.gadgets ui.gadgets.borders ui.gadgets.grid-lines
+ui.gadgets.grids ui.gadgets.icons ui.gadgets.incremental
+ui.gadgets.labels ui.gadgets.menus ui.gadgets.packs
+ui.gadgets.paragraphs ui.gadgets.presentations
+ui.gadgets.private ui.gadgets.scrollers ui.gadgets.tracks
+ui.gestures ui.images ui.pens.solid ui.render ui.theme
+ui.traverse ;
 FROM: io.styles => foreground background ;
 FROM: ui.gadgets.wrappers => <wrapper> ;
 IN: ui.gadgets.panes
@@ -99,9 +100,6 @@ M: pane selected-children
 
 : smash-pane ( pane -- gadget ) [ pane-nl ] [ output>> smash-line ] bi ;
 
-: pane-lines ( str -- lines )
-    string-lines [ { "" } ] when-empty ;
-
 : pane-write ( seq pane -- )
     [ pane-nl ] [ current>> stream-write ]
     bi-curry interleave ;
@@ -120,10 +118,10 @@ M: pane-stream stream-write1
     [ current>> stream-write1 ] do-pane-stream ;
 
 M: pane-stream stream-write
-    [ [ pane-lines ] dip pane-write ] do-pane-stream ;
+    [ [ split-lines ] dip pane-write ] do-pane-stream ;
 
 M: pane-stream stream-format
-    [ [ pane-lines ] 2dip pane-format ] do-pane-stream ;
+    [ [ split-lines ] 2dip pane-format ] do-pane-stream ;
 
 M: pane-stream dispose drop ;