use LineGap.append in shell/shell.sml
This commit is contained in:
@@ -2,9 +2,9 @@ structure Shell =
|
|||||||
struct
|
struct
|
||||||
open CML
|
open CML
|
||||||
|
|
||||||
fun ioToString (io, acc) =
|
fun ioToLineGap (io, acc) =
|
||||||
case TextIO.inputLine io of
|
case TextIO.inputLine io of
|
||||||
SOME str => ioToString (io, acc ^ str)
|
SOME str => ioToLineGap (io, LineGap.append (str, acc))
|
||||||
| NONE => acc
|
| NONE => acc
|
||||||
|
|
||||||
fun main () =
|
fun main () =
|
||||||
@@ -20,8 +20,7 @@ struct
|
|||||||
|
|
||||||
(* upload text vector *)
|
(* upload text vector *)
|
||||||
val io = TextIO.openIn "fcore/buffer.sml"
|
val io = TextIO.openIn "fcore/buffer.sml"
|
||||||
val str = ioToString (io, "")
|
val lineGap = ioToLineGap (io, LineGap.empty)
|
||||||
val lineGap = LineGap.fromString str
|
|
||||||
val _ = TextIO.closeIn io
|
val _ = TextIO.closeIn io
|
||||||
|
|
||||||
val textVec = Buffer.startBuildTextLineGap (0, lineGap, 1920, 1080)
|
val textVec = Buffer.startBuildTextLineGap (0, lineGap, 1920, 1080)
|
||||||
|
|||||||
Reference in New Issue
Block a user