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%))))