Refocus window on clicking the error source.

This commit is contained in:
Kathy Gray 2010-08-23 14:37:43 +01:00
parent a4e7ef3594
commit d3cab0a2ca

View File

@ -423,7 +423,15 @@
(list (make-srcloc src-editor (list (make-srcloc src-editor
line line
column column
position span)) #f)))) position span)) #f)
(let ([frame (send current-tab get-frame)])
(unless (send current-tab is-current-tab?)
(let loop ([tabs (send frame get-tabs)] [i 0])
(unless (null? tabs)
(if (eq? (car tabs) current-tab)
(send frame change-to-nth-tab i)
(loop (cdr tabs) (add1 i))))))
(send frame show #t)))))
(queue-callback highlight))]))) (queue-callback highlight))])))
(define (highlight-check-error srcloc src-editor) (define (highlight-check-error srcloc src-editor)