Commit Graph

21 Commits

Author SHA1 Message Date
Robby Findler
95841b9303 lift the restriction that the port passed to open-input-text-editor
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
2012-11-02 10:24:34 -05:00
Robby Findler
6c760b086f reindent the implementation of open-input-text-editor
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.
2012-11-02 10:24:34 -05:00
Matthew Flatt
69d2adce4d racket/gui: new-style error messages 2012-09-02 16:38:43 -06:00
Matthew Flatt
b111241afe racket/gui/init: fix load handler 2012-07-18 03:52:20 -06:00
Matthew Flatt
cc2c701a7d racket/gui/init: make load handler chain to original
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.
2012-07-17 06:19:15 -06:00
Matthew Flatt
5f1c8d3ec9 Revert "racket/gui/init: module caching in the load handler"
This reverts commit 5c02b1c95a.

The caching table doesn't hold entries weakly, which means that
it can be a space leak.
2012-07-17 06:11:35 -06:00
Matthew Flatt
5c02b1c95a racket/gui/init: module caching in the load handler 2012-07-16 19:22:30 -06:00
Matthew Flatt
74844152bc fix load handlers to match docs on parameters
Problems exposed by setting `read-accept-lang' to #f.
2012-05-29 13:57:32 -06:00
Matthew Flatt
b30374824a racket/draw: add #:eventspace' argument to open-output-text-editor'
The argument is `(curent-eventspace)' by default, which makes ports
work better with threads.

Closes PR 12749
2012-05-05 10:32:05 -06:00
Matthew Flatt
48f7ddafe4 racket/gui: fix some concurrency problems `text%'
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
2012-05-05 10:32:05 -06:00
Asumu Takikawa
d7fefc848b Fix requires to avoid circular dependencies. 2012-03-30 23:34:34 -04:00
Matthew Flatt
415b1eabc4 more load[/use-compiled] handler fixes for submodules
Closes PR 12630
2012-03-13 14:31:40 -06:00
Eli Barzilay
3157955d40 ".ss" -> ".rkt" scan done. 2011-07-02 10:37:53 -04:00
Matthew Flatt
a9dd80110a restore doc & page checking for `post-script-dc%' et al.
and also fix up wiring of `printer-dc%' in `editor<%>' so
 that `is-a?' tests works as expected
2011-01-14 20:30:51 -07:00
Sam Tobin-Hochstadt
f7559b8269 Move readable-snip<%>' to racket/snip'
Reprovide `racket/snip' rather than propagating it in `mred/mred'
2010-12-17 12:32:27 -05:00
Sam Tobin-Hochstadt
fb76a887d8 Refactor to create `racket/snip' collection. 2010-12-17 12:32:26 -05:00
Sam Tobin-Hochstadt
8a8a8dbe4b Separate snip% from the gui 2010-12-17 12:32:26 -05:00
Matthew Flatt
7fa0ae3ea6 fix typo 2010-12-16 12:20:39 -07:00
Robby Findler
4881bc33f4 open-input-text-editor: beef up the protection that the lock-while-reading? argument provides 2010-12-14 19:14:26 -06:00
Robby Findler
3e9858b001 added an argument to open-input-text-editor so that it can lock (and unlock) the editor when editing would not be allowed. 2010-10-13 15:55:17 -05:00
Matthew Flatt
28b4043077 rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00