From 10425033b892d2fa3e0d79b356fe52792aa1a25e Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 15 May 2016 16:02:01 -0500 Subject: [PATCH] fix marshalling of embedded editors --- gui-lib/framework/private/text.rkt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gui-lib/framework/private/text.rkt b/gui-lib/framework/private/text.rkt index d96f12fb..e7e52700 100644 --- a/gui-lib/framework/private/text.rkt +++ b/gui-lib/framework/private/text.rkt @@ -2270,7 +2270,9 @@ [the-snipclass (define base (new editor-stream-out-bytes-base%)) (define stream (make-object editor-stream-out% base)) + (write-editor-global-header stream) (send snip write stream) + (write-editor-global-footer stream) (snip-special snip (send the-snipclass get-classname) (send base get-bytes))] @@ -2284,7 +2286,10 @@ (define base (make-object editor-stream-in-bytes-base% (snip-special-bytes snip-special))) (define es (make-object editor-stream-in% base)) - (or (send snipclass read es) + (read-editor-global-header es) + (define the-snip (send snipclass read es)) + (read-editor-global-footer es) + (or the-snip (snip-special-snip snip-special))] [else (snip-special-snip snip-special)]))