From d85313fac669edbb8d1eef83553d36775cdcd496 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 22 Jun 2004 17:38:12 +0000 Subject: [PATCH] . original commit: 34dea07d245b9d91e8507174ea372e73d52447c1 --- collects/framework/private/text.ss | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/collects/framework/private/text.ss b/collects/framework/private/text.ss index 970fe75f..4c383c24 100644 --- a/collects/framework/private/text.ss +++ b/collects/framework/private/text.ss @@ -902,8 +902,7 @@ WARNING: printf is rebound in the body of the unit to always (define/public (send-eof-to-in-port) (channel-put read-chan eof)) (define/public (clear-input-port) - (channel-put clear-input-chan (void)) - (init-input-port)) + (channel-put clear-input-chan (void))) (define/public (clear-output-ports) (channel-put clear-output-chan (void)) @@ -991,10 +990,8 @@ WARNING: printf is rebound in the body of the unit to always ;; the evt inside is waited on to indicate the flush has occurred (define flush-chan (make-channel)) - ;; clear-output-chan, clear-input-chan : (channel void) - ;; dumps all data and readers making the ports empty again + ;; clear-output-chan : (channel void) (define clear-output-chan (make-channel)) - (define clear-input-chan (make-channel)) ;; write-chan : (channel (cons (union snip bytes) style)) ;; send output to the editor @@ -1167,6 +1164,9 @@ WARNING: printf is rebound in the body of the unit to always ;; commit-chan : (channel committer) (define commit-chan (make-channel)) + ;; clear-input-chan : (channel void) + (define clear-input-chan (make-channel)) + (define input-buffer-thread (thread (lambda () @@ -1212,6 +1212,7 @@ WARNING: printf is rebound in the body of the unit to always (semaphore-post peeker-sema) (set! peeker-sema (make-semaphore 0)) (set! peeker-evt (semaphore-peek-evt peeker-sema)) + (set! data (empty-queue)) (loop))) (handle-evt progress-event-chan