Commit Graph

697 Commits

Author SHA1 Message Date
Robby Findler
793ee71e69 fix a coloring bug
also, add a little more logging to the aspell logging info
2012-11-24 14:05:45 -06:00
Robby Findler
11a5721b59 made the install-plt menu item's browse
file dialog show files with ".plt" by default.

Also, clarified the docs for finder:default-extension

closes PR 13104
2012-11-22 20:35:06 -06:00
Robby Findler
5b18645a9a added spelling dictionary support
related to PR 13242
2012-11-22 19:24:22 -06:00
Robby Findler
6fff8a3030 make right-clicking on non-text offer copy and cut in the
popup menu

Extends append-editor-operation-menu-items so that when you
pass an editor and a position, it checks to see if that spot
has a non-string% snip and, if so, copies that one position
(or cuts it, depending).

Then, use that extension in DrRacket

closes PR 12791
2012-11-22 17:33:34 -06:00
Robby Findler
316bbcb038 fix c:c;c:b so it removes {}s
closes PR 13211
2012-11-22 10:25:57 -06:00
Robby Findler
d5f605f58d fix dynamic require for moved file 2012-11-22 09:27:07 -06:00
Robby Findler
d0ce0de398 change the way that the delegate text is specified, using
getter/setters instead of overriding a method

this has the benefit that the delegate does not have to be
rebuilt when switching tabs in drracket; we just leave the
old delegate on the old definitions text, and the swap it
back into the editor-canvas when we swap the text% object
itself back in.
2012-11-16 14:33:17 -06:00
Robby Findler
6fc70a04d8 adjust the code that maintains the blue "where am I" background
coloring in the contour window to make only a single call to
invalidate-bitmap-cache

It was making two before, which could have pretty similar regions,
leading to two repaints instead of just one. When pushing the down
arrow near the bottom of the visible regions of the definitions text
was causing those two calls to take about 30 milliseconds and after
this change the one call seems to be about half that (but there is
lots of variance so I'm only sure that it helped some, not how much)
2012-11-16 14:33:00 -06:00
Robby Findler
052ee14afc unbreak the contour window
A long time ago, I tried to improve the interactiveness
of DrRacket when the contour window was open with the
code that is removed in this commit. Looking at it today,
it seems clear that this code was buggy (and, now that
we've had lots of experience with it, it didn't actually
help with interactivity either)

The problem is that the code didn't record enough
information about the change to the editor in the thunk put
into the 'todo' field. It would remember that a particular
range was out of date, but it woudln't remember which
characters were in that range, so when it would go to copy
the characters, it may be getting the wrong characters
(since another edit may have happened since the thunk was
stored in the todo field)

This change also has the side benefit that the time it takes
to change the contour window is now being tracked by the
colorer, which means that it'll give up a bit sooner
coloring less in each go, but hopefully maintaining the
interactivity
2012-11-16 14:32:45 -06:00
Robby Findler
12e8332c55 move follow-log.rkt to tests/drracket 2012-11-16 07:26:38 -06:00
Robby Findler
d11f63bd46 fix bad require in follow-log.rkt and add some more histogram utils 2012-11-15 12:22:13 -06:00
Robby Findler
a9b6f8ea46 improve drracket's event log following code
- add support for getting a histogram of event timings

 - add support for scripting drr to be able to make comparisons
2012-11-15 07:49:04 -06:00
Robby Findler
8c47dbba01 make the 'failed to click on the radio box' error message more helpful 2012-11-11 20:13:25 -06:00
Robby Findler
c5330194a9 improve drracket's response to an unhappy aspell program
Specifically, two things:

 - make drracket more careful to not crash when aspell
   doesn't behave, and

 - have a more careful test when clicking the menu item
   (it now does a trial run of aspell instead of just
    looking for the binary)

closes PR 13242 (I realize there is still a feature
request mentioned in the audit trail of that PR, but
since the main problem is fixed, I'll consider that
to just be something separate)
2012-11-10 13:00:09 -06:00
Robby Findler
87dae0df7a add support for collecting backtraces 2012-11-08 07:45:19 -06:00
Robby Findler
741be85f07 make the log follower always available in DrRacket 2012-11-07 16:07:07 -06:00
Eli Barzilay
672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00
Robby Findler
81dc3bae37 audit the calls to invalidate-bitmap-cache in the framework and in
drracket and try to make them happen less often (or, if there will be
multiple ones, try to guarantee that there is an edit sequence)
2012-11-04 19:02:55 -06:00
Robby Findler
c375042f10 fix test so that labels can be regexps (as was already
documented) and tidy up framework/test docs
2012-11-03 13:54:48 -05:00
Robby Findler
0377bda947 make popup menus respond to mouse-up events, not mouse-down ones 2012-11-02 20:32:55 -05:00
Robby Findler
4ead534227 It appears that the colorer was always creating a new port to read
from, each time it starts on a new event boundary (this means that in
the old (5.3) version of the colorer, it also created a new co-routine
on each event boundary! (in other words, most of the reason one would
want co-routines here was bogus))

So, refactor the code to just always do this and eliminate a bunch of
set!'s and private fields in favor of just passing arguments like sane
code does. (We can't eliminate all of that, because we still do need
to be able to abort and thus all calls must be tail calls.)
2012-11-02 10:24:34 -05:00
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
9582fe830a add logging to the colorer 2012-10-31 10:16:16 -05:00
Robby Findler
226a7140b5 fix a bug in the colorer refactoring
As it turns out, changing the color (via change-style) can somtimes
split snips, which can change the revision number, which means that
the open port into the editor is no longer valid.

Since this doesn't seem to happen very much when editing in DrRacket,
we just detect this situation and give up on this colorer's port, and
hopefully it actually doesn't happen much (the place it happened that
let me notice this was when inserting an image via a menu in the
drracket test suites)
2012-10-31 10:16:16 -05:00
Robby Findler
f07c8cf490 changed the colorer so that it doesn't use a co-routine; instead,
refactor it so it doesn't add anything to the continuation ever, and
just check if it has been a while since we started (giving other
events a chance to run, if so). Also, interleave the calls to
change-style with the parsing of the buffer to get a more accurate
count of the time the colorer is taking
2012-10-30 22:11:52 -05:00
Robby Findler
789ab0d9f0 add missing docs for color:misspelled-text-color-style-name 2012-10-27 14:42:09 -05:00
Robby Findler
e89a121ae5 add some first-cut logging information to drracket
to track how long events take to be handled
2012-10-26 21:49:44 -05:00
Robby Findler
5b3ac50fb9 add get-token-range to color:text<%> (it was already documented
as if it was there)
2012-10-16 10:51:45 -05:00
Robby Findler
4787361d7f show a dialog box saying that aspell/ispell cannot be
found instead of just silently not checking the spelling

also, fix a bug in that case that used to cause drracket
to just crash
2012-10-15 07:41:42 -05:00
Robby Findler
a59df8c7ee add preference settings so that the misspelled words color
can be configured
2012-10-14 22:27:50 -05:00
Robby Findler
44a0c8a6c1 adjust spelling code so that it runs in the abortable part
of the syntax colorer; adjust the spelling code so that it
uses nack events to communicate, in case things get aborted
2012-10-14 21:20:36 -05:00
Robby Findler
c75cc48f5c fix spell checker encoding 2012-10-14 18:45:10 -05:00
Robby Findler
72fa1d45a1 add capability to spell-check string constants
(calls out to ispell or aspell)
2012-10-14 17:40:56 -05:00
Robby Findler
c675cf47f0 adjust the print-to-ps preference in DrRacket so that you can also
choose to print to pdf as well. Also, enable the preference
under linux (ie, make it available to be chosen-- all platforms
still default to printing via the platform-specific mechanism)
2012-09-17 10:47:22 -05:00
Robby Findler
9b15450b08 export and document enabled-shown-button?
label-of-enabled/shown-button-in-top-level-window?
       and button-in-top-level-focusd-window?
2012-09-08 15:58:25 -05:00
Robby Findler
977fd37913 adjust contract for test:button-push so it isn't so ugly 2012-08-29 14:52:56 -05:00
Robby Findler
f1a4aeedba control-alt for menu selections probably shouldn't be
used under windows, so just give a menu shortcut under
macosx and under windows rely on the underscore thingy
2012-08-21 08:16:39 -05:00
Robby Findler
e38e959145 change the new 'find from selection' menu item so that it uses
cmd-alt-f on the mac (and control-alt-f on windows/unix, I believe)
2012-08-19 18:04:14 -05:00
Robby Findler
49eb4ab11c adjust the windows menu so that it doesn't rely on
various callbacks to keep its menu items straight, but
instead uses the on-demand callback to just get them
all right.
2012-08-16 19:16:57 -05:00
Robby Findler
e65cbdecf0 Rackety 2012-08-07 13:03:45 -05:00
Robby Findler
94a448413e add some highlighting to the line numbers to show where
the insertion point currently is

closes PR 12976
2012-08-07 12:12:45 -05:00
Robby Findler
b5f9751369 add some highlighting to the line numbers to show where
the insertion point currently is

closes PR 12976
2012-08-06 22:24:59 -05:00
Robby Findler
b16843a908 add a find-from-selection menu item that grabs the selection and puts
it directly into the find window

related to PR 12978
2012-08-06 18:00:57 -05:00
Robby Findler
9b39fc37f8 adjust the filename filter for the insert-images menu item
closes PR 12963
2012-08-02 07:17:09 -05:00
Eli Barzilay
2ebab9b93f Redo text sculpturing. 2012-07-06 16:07:30 -04:00
Robby Findler
8f892a2d3a when moving the focus to the replace window, also select the text
closes PR 12855
2012-06-20 09:27:16 -05:00
Robby Findler
dfa0305bb3 fix interaction between the framework's first-line-mixin and
line-numbers mixin

Specifically, when both are turned on, the #lang line now shows
the line number and shifts the "#lang ..." over to the same spot
where it is drawn when the first line is natually visible

Also, rackety
2012-05-15 22:08:42 -05:00
Matthew Flatt
964020f288 implement scribble/srcdoc' via submodules instead of expand'
Also add a `for-doc' require form, make `proc-doc' et al. provide
forms, make `provide/doc' an alias for `provide'.
2012-05-12 01:37:50 -06:00
Eli Barzilay
17090fca4f A bunch of fprintf' -> eprintf' conversions (and a few related things). 2012-05-06 12:06:00 -04:00
Robby Findler
80d57148d1 fix bug in docs; closes PR 12716 2012-04-22 21:54:19 -05:00