From fc0fd4b5372fc9e33fc9374043fb2290bc3b1c2e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 10 Feb 2012 00:43:26 -0500 Subject: [PATCH] Fix a bug where retrieving a submission would get appended to the default #lang line. --- collects/handin-client/client-gui.rkt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collects/handin-client/client-gui.rkt b/collects/handin-client/client-gui.rkt index de58774803..a97a9cd67a 100644 --- a/collects/handin-client/client-gui.rkt +++ b/collects/handin-client/client-gui.rkt @@ -201,7 +201,7 @@ [label (case mode [(submit) button-label/h] [(retrieve) button-label/r] - [else (string-append " " button-label/h " ")])] ; can change + [else (string-append " " button-label/h " ")])] ; can change [parent button-panel] [style '(border)] [callback @@ -722,7 +722,9 @@ [stream (make-object editor-stream-in% base)]) (read-editor-version stream base #t) (read-editor-global-header stream) - (send defs read-from-file stream) + (send* defs (begin-edit-sequence #f) + (erase) (read-from-file stream) + (end-edit-sequence)) (read-editor-global-footer stream))) (define tool@