Macro stepper: navigation preserves visible line range
svn: r7596
This commit is contained in:
parent
52c91eb786
commit
2d59128e59
|
@ -313,12 +313,25 @@
|
||||||
(define end-box (box 0))
|
(define end-box (box 0))
|
||||||
(send text get-visible-position-range start-box end-box)
|
(send text get-visible-position-range start-box end-box)
|
||||||
(update)
|
(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
|
;; update/save-position : -> void
|
||||||
(define/private (update/save-position)
|
(define/private (update/save-position)
|
||||||
(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
|
;; update : -> void
|
||||||
;; Updates the terms in the syntax browser to the current step
|
;; Updates the terms in the syntax browser to the current step
|
||||||
|
|
Loading…
Reference in New Issue
Block a user