commit bcacd7b7de28ee20debfee38716b5812d9bbef72 parent f07ce280c6fc0df17e343b24c8699b834de47bd6 Author: Ryan Culpepper <ryanc@racket-lang.org> Date: Tue, 30 Oct 2007 22:02:17 +0000 Macro stepper: navigation preserves visible line range svn: r7596 original commit: 2d59128e5984963aed15fa58934976894e150db0 Diffstat:
| M | collects/macro-debugger/view/stepper.ss | | | 19 | ++++++++++++++++--- |
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/collects/macro-debugger/view/stepper.ss b/collects/macro-debugger/view/stepper.ss @@ -313,13 +313,26 @@ (define end-box (box 0)) (send text get-visible-position-range start-box end-box) (update) - (send text scroll-to-position (unbox start-box) #f (unbox end-box))) - + (send text scroll-to-position (unbox start-box) #f (unbox end-box) 'start)) + ;; update/save-position : -> void (define/private (update/save-position) (save-position) - (update)) + (update/preserve-lines-view)) + ;; update/preserve-lines-view : -> void + (define/public (update/preserve-lines-view) + (define text (send sbview get-text)) + (define start-box (box 0)) + (define end-box (box 0)) + (send text get-visible-line-range start-box end-box) + (update) + (send text scroll-to-position + (send text line-start-position (unbox start-box)) + #f + (send text line-start-position (unbox end-box)) + 'start)) + ;; update : -> void ;; Updates the terms in the syntax browser to the current step (define/private (update)