cannot change its revision number during reading
This restriction was enforced only for editors that have non
string-snip% snips. The restriction was in place because the
implementation strategy was to chain thru the snips in the editor
using (send snip next) and that isn't safe if the revision number
changes.
The lifting of the restriction is implemented by tracking the position
in the editor where the last snip ended and, if the revision number
changes, starting over trying to get a snip from that position. This
has the effect that, if the revision number never changes, the code
should behave the same as it was doing before (so hopefully any new
bugs I've introduced in this commit will only show up if the old
implementation would have raised an error)
Also, exploit the lifting of this restriction in the colorer so it
doesn't to restart the port during to coloring that happens along with
the parsing
Apologies for the gratuitious reindent, but I was having
a lot of trouble reading this file; it appears to have
last been worked on in an Emacs that used tabs for indentation
and doesn't use the same tab width as drracket.
For a non-WXME file, fall back to the original load handler,
instead of re-implementing it. This makes module caching work
the right way. Falling back to the original means closing
the port and then re-opening the file to load, but that seems
ok.
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