From 950d165133768ac8fe500b7bfea5eb22f8d5286c Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 6 Jan 2012 20:58:32 -0600 Subject: [PATCH] fix the not-a-language message so that the styles in the REPL are right --- collects/drracket/private/rep.rkt | 6 ++++-- collects/framework/private/text.rkt | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/collects/drracket/private/rep.rkt b/collects/drracket/private/rep.rkt index 7f5dc3a747..e2671264cb 100644 --- a/collects/drracket/private/rep.rkt +++ b/collects/drracket/private/rep.rkt @@ -1641,9 +1641,9 @@ TODO (λ args (drracket:app:about-drscheme)) click-delta)) (set! setting-up-repl? #f) - (thaw-colorer) (send context disable-evaluation) (reset-console) + (thaw-colorer) (insert-prompt) ;; call the first-opened method on the user's thread, but wait here for that to terminate @@ -1710,7 +1710,9 @@ TODO obj (if (eq? (car i) sp-err-other-end) (get-err-port) - (get-out-port))))) + (get-out-port)))) + (flush-output (get-err-port)) + (flush-output (get-out-port))) (send context enable-evaluation) (end-edit-sequence) diff --git a/collects/framework/private/text.rkt b/collects/framework/private/text.rkt index 1b148fdad9..a89dc4bd4b 100644 --- a/collects/framework/private/text.rkt +++ b/collects/framework/private/text.rkt @@ -2007,7 +2007,9 @@ get-focus-snip get-view-size scroll-to-position - position-location) + position-location + get-styles-fixed + set-styles-fixed) ;; private field (define eventspace (current-eventspace)) @@ -2305,9 +2307,11 @@ ;; do-insertion : (listof (cons (union string snip) style-delta)) boolean -> void ;; thread: eventspace main thread (define/private (do-insertion txts showing-input?) - (let ([locked? (is-locked?)]) + (let ([locked? (is-locked?)] + [sf? (get-styles-fixed)]) (begin-edit-sequence) (lock #f) + (set-styles-fixed #f) (set! allow-edits? #t) (let loop ([txts txts]) (cond @@ -2341,6 +2345,7 @@ (unless (is-a? str/snp string-snip%) (change-style style old-insertion-point insertion-point)))) (loop (cdr txts))])) + (set-styles-fixed sf?) (set! allow-edits? #f) (lock locked?) (unless showing-input?