diff --git a/collects/macro-debugger/syntax-browser/display.ss b/collects/macro-debugger/syntax-browser/display.ss index 6d551b1..9fe40f8 100644 --- a/collects/macro-debugger/syntax-browser/display.ss +++ b/collects/macro-debugger/syntax-browser/display.ss @@ -51,7 +51,7 @@ (base-style (standard-font text config)) (start-position insertion-point) (end-position (+ insertion-point output-length)))) - (send text begin-edit-sequence) + (send text begin-edit-sequence #f) (define **editing (now)) (send text insert output-length output-string insertion-point) (define **inserted (now)) @@ -110,7 +110,7 @@ (define/public (refresh) (with-unlock text (send* text - (begin-edit-sequence) + (begin-edit-sequence #f) (change-style unhighlight-d start-position end-position)) (apply-extra-styles) (let ([selected-syntax diff --git a/collects/macro-debugger/syntax-browser/pretty-printer.ss b/collects/macro-debugger/syntax-browser/pretty-printer.ss index a6e3e52..1295390 100644 --- a/collects/macro-debugger/syntax-browser/pretty-printer.ss +++ b/collects/macro-debugger/syntax-browser/pretty-printer.ss @@ -29,13 +29,15 @@ (let-values ([(line column position) (port-next-location port)]) (sub1 position))) (define (pp-pre-hook obj port) - (send range-builder push! obj (current-position)) + (when (flat=>stx obj) + (send range-builder push! (current-position))) (send range-builder set-start obj (current-position))) (define (pp-post-hook obj port) - (send range-builder pop! (flat=>stx obj) (current-position)) + (define stx (flat=>stx obj)) + (when stx + (send range-builder pop! stx (current-position))) (let ([start (send range-builder get-start obj)] - [end (current-position)] - [stx (flat=>stx obj)]) + [end (current-position)]) (when (and start stx) (send range-builder add-range stx (cons start end))))) (define (pp-extend-style-table identifier-list) @@ -132,7 +134,7 @@ (define saved-starts null) (define saved-subss null) - (define/public (push! obj start) + (define/public (push! start) (set! saved-starts (cons working-start saved-starts)) (set! saved-subss (cons working-subs saved-subss)) (set! working-start start) @@ -182,5 +184,3 @@ (>= (- (range-end x) (range-start x)) (- (range-end y) (range-start y))))))) )) - - diff --git a/collects/macro-debugger/syntax-browser/properties.ss b/collects/macro-debugger/syntax-browser/properties.ss index 2d84de3..63176ba 100644 --- a/collects/macro-debugger/syntax-browser/properties.ss +++ b/collects/macro-debugger/syntax-browser/properties.ss @@ -43,7 +43,7 @@ (define/public (refresh) (send* text (lock #f) - (begin-edit-sequence) + (begin-edit-sequence #f) (erase)) (if (syntax? selected-syntax) (refresh/mode mode) diff --git a/collects/macro-debugger/view/stepper.ss b/collects/macro-debugger/view/stepper.ss index b833438..1226e11 100644 --- a/collects/macro-debugger/view/stepper.ss +++ b/collects/macro-debugger/view/stepper.ss @@ -309,7 +309,7 @@ (define text (send: sbview sb:syntax-browser<%> get-text)) (define position-of-interest 0) (define multiple-terms? (> (length (cursor->list terms)) 1)) - (send text begin-edit-sequence) + (send text begin-edit-sequence #f) (send: sbview sb:syntax-browser<%> erase-all) (update:show-prefix)