Specifically, when a style change happens that ends up
not changing the size of anything, then track that
lack of size change enough to be able to avoid
calling on-reflow.
This is important for the interaction between the
colorer and the search bubbles in DrRacket. That is,
when you make an edit that causes the colorer to have
lots of work, then each chunk of work it does before
yielding control to the event loop would also trigger
a call to on-reflow, which would cause the search bubbles
to recompute their sizes. Overall, the main bad thing
this does is cause lots of allocation and aside from
that it doesn't hurt interactivity. Still, there is a
lot of useless work here, and those extra GCs can be
pretty substantial when you're doing something crazy like
searching for " " in a big file.... (there are 95k spaces
in unit.rkt, in case you were curious)
A recent bug fix involved moving part of an `editor-canvas%' resize
out of atomic mode by queueing a callback (because the resize involves
quesrying the editor for its size, etc.), but then the callback
happens after a canvas is shown, which can cause it to appear with
bogus initial scrollbars. Queue the callback instead as a "refresh"
level callback, which gets a chance to run before a frame is made
visible.
The `on-size' method is called in atomic mode,
and we can't call into the editor's sizing functions
in atomic mode.
Watch out for refresh and/or window-sizing problems.
Changed `open-output-text-editor' to put its additions into
an edit sequence to better work with threads.
Fixed problems in editor-canvas refresh and resize events, where
the editor's refresh synchronization wasn't used properly.
Fixed race conditions in the the protocol that is used to separate
refreshes and edit sequences.
Related to PR 12749
Somewhere along the way --- probably in porting the editor
classes to Racket --- the caps-lock specification in a keymap
string was treated the same as other modifiers, but it is
supposed to be neutral when the key string starts with ":".
Closes PR 5486, 10347, 10993, 12184
More generally, fix horizontal refresh when an editor has left
padding. Otherwise, deleting a character in DrRacket with line
numbers shown seems sluggish, because the update waits for a
refresh event.
- adds a `#:timeout-lock-there' argument to `get-preference'
- fixes preference looup in `racket/gui'
- make preference names consistently use `GRacket' and consistently
fall back on `MrEd' names
- fix Emacs-style undo mode while we're at it
This change may also affect other attempts to scroll, however, so watch for strange scrollings when multiple editor-canvaess are displaying the same text% object.
closes PR 10853