From eb84c815777cd8e6f01272482059dfaaea286bbc Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 9 Dec 2003 17:34:15 +0000 Subject: [PATCH] . original commit: 66a76d773dd33e5e994a9d303b280f228941d2b6 --- collects/mred/mred.ss | 4 +++- collects/tests/mred/editor.ss | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/collects/mred/mred.ss b/collects/mred/mred.ss index 4d150158..7196f6c5 100644 --- a/collects/mred/mred.ss +++ b/collects/mred/mred.ss @@ -7500,7 +7500,9 @@ (next-snip empty-string) (set! pos (add1 pos))) (values val size))) - (values (send the-snip copy) alt-size)) + (begin + (next-snip empty-string) + (values (send the-snip copy) alt-size))) (begin (next-snip empty-string) (values the-snip alt-size)))))] diff --git a/collects/tests/mred/editor.ss b/collects/tests/mred/editor.ss index 3cc8d659..ff6d20d7 100644 --- a/collects/tests/mred/editor.ss +++ b/collects/tests/mred/editor.ss @@ -104,7 +104,16 @@ (test '(1 12 13) 'pos (call-with-values (lambda () (port-next-location p)) list)) (test 'multi 'read (read p)) (test '(1 13 14) 'pos (call-with-values (lambda () (port-next-location p)) list)) - (test eof 'read (read p)))) + (test eof 'read (read p))) + (stv e insert (make-object image-snip% (build-path + (collection-path "icons") + "plt.gif"))) + (let ([p (open-input-text-editor e)]) + (test 'hello 'read (read p)) + (test 'there 'read (read p)) + (test 'multi 'read (read p)) + (test 'multi 'read (read p)) + (test #t 'read (is-a? (read p) image-snip%))))