add some highlighting to the line numbers to show where

the insertion point currently is

closes PR 12976

original commit: 94a448413ee9b371bc7822f27ac422776cf1ca3a
This commit is contained in:
Robby Findler 2012-08-06 12:12:24 -05:00
parent 6d8cf91696
commit 22fee824e5

View File

@ -4081,7 +4081,7 @@ designates the character that triggers autocompletion
(get-highlight-background-color) (get-highlight-background-color)
(if (preferences:get 'framework:white-on-black?) (if (preferences:get 'framework:white-on-black?)
"lime" "lime"
"forestgreen")) "forestgreen"))
'solid) 'solid)
(send dc draw-rectangle ls final-y (- right-space single-w) single-h) (send dc draw-rectangle ls final-y (- right-space single-w) single-h)
@ -4171,13 +4171,22 @@ designates the character that triggers autocompletion
(define old-position #f) (define old-position #f)
(define/augment (after-set-position) (define/augment (after-set-position)
(when old-position (cond
(invalidate-at-position old-position)) [(and old-position
(set! old-position (and (= (get-start-position) (= (get-start-position)
(get-end-position)) (get-end-position))
(get-start-position))) (= (position-line old-position)
(when old-position (position-line (get-start-position))))
(invalidate-at-position old-position)) ;; when the line stays the same, don't invalidate anything
(set! old-position (get-start-position))]
[else
(when old-position
(invalidate-at-position old-position))
(set! old-position (and (= (get-start-position)
(get-end-position))
(get-start-position)))
(when old-position
(invalidate-at-position old-position))])
(inner (void) after-set-position)) (inner (void) after-set-position))
(define/private (invalidate-at-position pos) (define/private (invalidate-at-position pos)