adjustments to the colorer-out-of-sync gizmo
(the "()" in the bottom right of the drracket window) to make sure that it is right when switching tabs and when a frame is first opened
This commit is contained in:
parent
cef9f90c27
commit
0fe0858ba8
|
@ -2810,6 +2810,7 @@ module browser threading seems wrong.
|
||||||
definitions-canvases)
|
definitions-canvases)
|
||||||
(for-each (λ (ints-canvas) (send ints-canvas refresh))
|
(for-each (λ (ints-canvas) (send ints-canvas refresh))
|
||||||
interactions-canvases)
|
interactions-canvases)
|
||||||
|
(set-color-status! (send definitions-text is-lexer-valid?))
|
||||||
(end-container-sequence)))
|
(end-container-sequence)))
|
||||||
|
|
||||||
(define/pubment (on-tab-change from-tab to-tab)
|
(define/pubment (on-tab-change from-tab to-tab)
|
||||||
|
@ -4122,6 +4123,10 @@ module browser threading seems wrong.
|
||||||
|
|
||||||
(set-label-prefix (string-constant drscheme))
|
(set-label-prefix (string-constant drscheme))
|
||||||
(set! newest-frame this)
|
(set! newest-frame this)
|
||||||
|
;; a callback might have happened that initializes set-color-status! before the
|
||||||
|
;; definitions text is connected to the frame, so we do an extra initialization
|
||||||
|
;; now, once we know we have the right connection
|
||||||
|
(set-color-status! (send definitions-text is-lexer-valid?))
|
||||||
(send definitions-canvas focus)))
|
(send definitions-canvas focus)))
|
||||||
|
|
||||||
;; get-define-popup-name : (or/c #f (cons/c string? string?) (list/c string? string? string)) boolean -> (or/c #f string?)
|
;; get-define-popup-name : (or/c #f (cons/c string? string?) (list/c string? string? string)) boolean -> (or/c #f string?)
|
||||||
|
|
|
@ -137,7 +137,6 @@ added get-regions
|
||||||
(new paren-tree% (matches pairs))))
|
(new paren-tree% (matches pairs))))
|
||||||
|
|
||||||
(define lexer-states (list (make-new-lexer-state 0 'end)))
|
(define lexer-states (list (make-new-lexer-state 0 'end)))
|
||||||
|
|
||||||
(define/public (get-up-to-date?)
|
(define/public (get-up-to-date?)
|
||||||
(andmap lexer-state-up-to-date? lexer-states))
|
(andmap lexer-state-up-to-date? lexer-states))
|
||||||
|
|
||||||
|
@ -246,6 +245,7 @@ added get-regions
|
||||||
(on-lexer-valid lexers-all-valid?)))
|
(on-lexer-valid lexers-all-valid?)))
|
||||||
(define/pubment (on-lexer-valid valid?)
|
(define/pubment (on-lexer-valid valid?)
|
||||||
(inner (void) on-lexer-valid valid?))
|
(inner (void) on-lexer-valid valid?))
|
||||||
|
(define/public-final (is-lexer-valid?) lexers-all-valid?)
|
||||||
|
|
||||||
(define/private (reset-tokens)
|
(define/private (reset-tokens)
|
||||||
(for-each
|
(for-each
|
||||||
|
|
|
@ -229,6 +229,10 @@
|
||||||
The default method just returns @racket[(void)].
|
The default method just returns @racket[(void)].
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@defmethod[#:mode public-final (is-lexer-valid?) boolean?]{
|
||||||
|
Indicates if the lexer is currently valid for this editor.
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@defmixin[color:text-mixin (text:basic<%>) (color:text<%>)]{
|
@defmixin[color:text-mixin (text:basic<%>) (color:text<%>)]{
|
||||||
Adds the functionality needed for on-the-fly coloring and parenthesis
|
Adds the functionality needed for on-the-fly coloring and parenthesis
|
||||||
|
|
Loading…
Reference in New Issue
Block a user