Commit Graph

79 Commits

Author SHA1 Message Date
Robby Findler
ec28c2ad05 re-enable autosave only if a save is successful, not just attempted
when combined with 94b54db11823b4683234424174aca2836d422204,
closes PR 13359

original commit: 89373c78500e523f1d4ac71cfd08c5da16ef3778
2013-01-05 11:35:13 -06:00
Robby Findler
4301beb622 guard call to file-or-directory-permissions
related to PR 13359
also, Rackety

original commit: 0c76c692aca42a729c1867d7e9ca0f55ca4ec766
2013-01-05 11:35:13 -06:00
Robby Findler
2b98dcfe72 adjust the search bubbles so they flicker less when typing
original commit: fa85d30773beed1d7136683dbac94d5efb90a462
2012-12-25 17:40:32 -06:00
Robby Findler
1cf8e97387 adjust line number mixin so it postpones recomputation of
sizes until the end of an edit sequence (when appropriate)

original commit: a504f77d54ff82785123d27dbccee1ab9d910e69
2012-12-24 12:30:54 -06:00
Robby Findler
75820c03cd another attempt to avoid building rectangles
where the right edge is left of the left edge

original commit: cc0a105e21c358290d1f92144c4a230801d5cdd0
2012-12-01 14:50:19 -06:00
Robby Findler
e1f0b95e68 make the paren highlight use non alpha=1 colors so that
the paren highlight composes with other highlighting in the editor

original commit: 7ac80bbb01ef6048df4a471dc7fd08b1838fce8d
2012-11-30 10:00:46 -06:00
Robby Findler
d54e68a2e7 Possible fix for error raised by build-rectangle
When switching tabs while an on-reflow initiated callback
might still be running can lead to bogus information
coming back from position-locations, as the editor loses
its admin.

So, we just give up recomputing the rectangles when the
admin is gone and, for now, expect that there will be
another on-reflow call when the admin comes back that'll
restart the process (not sure that this is guaranteed tho)

original commit: 52d0b7e352a493e127e0d7cd780a34938dddea08
2012-11-28 10:54:34 -06:00
Robby Findler
5717adf512 add a little more info into the build-rectangle check for when it fails
original commit: 4af72a5825c4296885eb1dc8fe374331e2697123
2012-11-26 23:30:10 -06:00
Robby Findler
76834746c1 clean up the text:searchable docs based on recent changes
original commit: 43e7150fdfe1ae54dab6a283b0da451d0589713c
2012-11-26 18:42:18 -06:00
Robby Findler
45eaab276e make unhighlight-range remove only the first matching range, not
all of the matching ranges

original commit: 6d56491e8db5a7c2a4c735155ff1547014c4d371
2012-11-26 18:42:18 -06:00
Robby Findler
28aa5e9f26 fix some right/top mixups
closes PR 13312

original commit: df5ee4c7bac01f87d3cfd75846cda4152bf0da5b
2012-11-26 12:23:27 -06:00
Robby Findler
528ac68d11 fix one way that rectangles could have the left side be to the
right of the right side

original commit: f8793c0cc2be9a4592ffd12c620920eadb1dee49
2012-11-26 10:56:04 -06:00
Robby Findler
6d9a8922d6 fix bug in error checking code
original commit: ba89a5da9229749995fe6e6e8995684f4ab98dba
2012-11-26 07:55:18 -06:00
Robby Findler
2559cc2800 improve the interactivity of DrRacket's search
Changes the implementation of highlight-range so that it
only recomputes all of the new locations from the positions
when on-reflow is called (otherwise only computing the
relevant ones) and make the on-reflow callback chop itself
up, in case there are lots of highlighted ranges to avoid
tying up the event loop.

Changes searching so that it doesn't neccessarily compute
the entire search results in a single event callback
(but also make it start the computation more aggressively)

Overall, this changes the strategy from one that, for any potentially
long-running callback, just tried to push it off into the future, into
a strategy that tries to avoid long-running callbacks by breaking the
work up into chunks, but starting the first chunk immediately (in a
low-priority callback).

Also, misc other changes to make this work better and generally clean
things up.

original commit: 5197649cb7556abd96282d3a838c4ba4f7c8de8c
2012-11-25 20:58:13 -06:00
Robby Findler
8311497772 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

original commit: 052ee14afc748929f9195620c183f053d307ac21
2012-11-16 14:32:45 -06:00
Robby Findler
14747de35e 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)

original commit: 81dc3bae37690e066204051b8b32d7db16ce4a67
2012-11-04 19:02:55 -06:00
Robby Findler
75ea19d0f4 add some first-cut logging information to drracket
to track how long events take to be handled

original commit: e89a121ae5e42366702a4674cd79b339151175a3
2012-10-26 21:49:44 -05:00
Robby Findler
22fee824e5 add some highlighting to the line numbers to show where
the insertion point currently is

closes PR 12976

original commit: 94a448413ee9b371bc7822f27ac422776cf1ca3a
2012-08-07 12:12:45 -05:00
Robby Findler
6d8cf91696 add some highlighting to the line numbers to show where
the insertion point currently is

closes PR 12976

original commit: b5f97513699690a76e54fdea7d884b39032b9e00
2012-08-06 22:24:59 -05:00
Robby Findler
93404aaf3a 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

original commit: dfa0305bb3234808334607758f6ddceb32767824
2012-05-15 22:08:42 -05:00
Robby Findler
018fd62d43 add a preference to control whether or not there is an extra
pixel of space in between lines in DrRacket.

This change is based on Matthew's experience having a look
at the font setup on the three platforms.

He writes:
>  * Mac OS X: the convention seems to be to add space between lines.
>   TextEdit, for example, looks like DrRacket: the maze has spaces.
>
>   (I can't find a font that makes the maze look right, actually, even
>   if I adjust the line spacing.)
>
>  * Windows: the convention seems to be that space is built into the
>   font. DrRacket (and SirMail) draw lines more sparsely than Notepad.
>
>   Perhaps consistent with the differing conventions, the height of
>   "Courier New" at 11-pixel size is 14 on Windows, 13 on Mac OS X.
>
>  * Unix: the convention seems to be to add space. DrRacket looks like
>   the default Terminal and Text Editor programs on Ubuntu.
>
>   The maze nevertheless looks right everywhere, because the glyphs
>   extend an extra pixel above the declared bounding box!

original commit: 0d6b82537776ad4bd850e3b7c5cc1bdaa209b865
2012-03-24 20:20:05 -05:00
Asumu Takikawa
f9e4af3567 framework: add missing methods to interface and docs
The set-replace-start and get-replace-search-hit methods were
missing in the text:searchable<%> interface. The latter was
also undocumented.

original commit: 04f7bdbb021d1dbcac959eed439050abc36ee1b7
2012-03-01 13:17:48 -05:00
Sam Tobin-Hochstadt
dc8edd7062 Refactor and improve fuzzy searching in completion.
original commit: e3609cdb3281993854f7ea57ae63b89be07f3d43
2012-01-13 14:39:05 -05:00
Robby Findler
1c40749acf fix the not-a-language message so that the styles in the REPL are right
original commit: 950d165133768ac8fe500b7bfea5eb22f8d5286c
2012-01-06 20:59:34 -06:00
Robby Findler
ff6fa2736c some long overdue Rackety: renaming the 'scheme:' exports of the framework to 'racket:'
original commit: 458e2c2282adca43aabe3d1e62957389d2fbe798
2011-11-30 06:45:50 -06:00
Robby Findler
c0ffac2972 adjust the completions box so that it doesn't raise the error mentioned in 12396 anymore
closes PR 12396

original commit: 081dc6c9a1f67862af6a8ae2d7dfcafb21afe686
2011-11-26 18:30:25 -06:00
Sam Tobin-Hochstadt
8206ecb470 Make autocompletion fuzzier, similar to the doc search.
For example, autocomplete of `cur-dir' will produce the same list of results as the documentation search, with `current-directory' first, instead of producing no results.

original commit: 0754e6b702063efd4153848386d4467c13587fb1
2011-11-13 16:33:17 -05:00
Robby Findler
6632c07805 adjust uses of after-load-file to use the success? flag
original commit: fcc720f43e7f92063637af65b8c087327908e2ca
2011-10-08 10:50:27 -05:00
Robby Findler
c4deab2e67 fix crlf mode initialization
original commit: b71e562284168419abb5500e2eaceb9d0488f363
2011-10-01 08:10:25 -05:00
Robby Findler
eb943f394e Adjust DrRacket so that it saves files with CRLF
line terminators when:

  a) running under windows, and
  b) the file on the disk (when DrRacket first opens it)
     contains all CRLF line endings.

In all other situations, the file is saved with LF terminators.

Before this commit, DrRacket would always use the platform-specific
convention, regardless of the original content of the file.

closes PR 12242

original commit: 4a2757f2004fa84901cbae7ff9a257616ce7acaa
2011-09-30 17:08:07 -05:00
Ryan Culpepper
7fb542cbf5 removed useless requires
original commit: c7f86d276c68b12e87dc46cef4a8e1b95538f88d
2011-09-27 19:28:44 -06:00
Robby Findler
63d9d89abb extend and refactor minor stuff in the framework
specifically add an argument to move/copy-to-edit so that it
does copy-only and export a function for trigger a submission
to the input port of a text:ports<%> object programmatically

original commit: 2ec720176a295f147cbb461f6b804e05c78ee57d
2011-09-22 10:51:47 -05:00
Robby Findler
48e71d341a manage the state for delegates better (used by the drracket contour window)
closes PR 12094

original commit: 38596a9b581c06a7bdc8faba26c8e0cfb1b09492
2011-08-07 18:39:22 -05:00
Robby Findler
b1c27e35c2 get rid of a broken attempt to optimize the 20,000-ft overview refreshing
closes PR 12083

original commit: 29a843ac379438a6b7540716c68537a09c62ac51
2011-08-03 09:58:23 -05:00
Robby Findler
7c6bdcbc98 added edit-sequence when flushing the delegate updates
original commit: 524d53339296a9b1d047ed77bd50b99a031ef9fc
2011-06-17 15:46:52 +08:00
Robby Findler
5c21353cb5 attempt to try to make the contour window feel faster by delaying the work until nothing has happened for 250 msec
original commit: 24d11805ac25fcb3a0505009ff47ff8c95392f5e
2011-06-17 12:43:14 +08:00
Jon Rafkind
59a546f676 line numbers separator uses the same color as the text
original commit: 576916d4d7de34fe9927eac46b2fc65a5edf9aa1
2011-04-04 13:07:25 -06:00
Robby Findler
4c0a52964d lift the restriction that the text:ports mixin
cannot do io from the eventspace handler thread
and add a test suite for text:ports

original commit: 8e94ce49e417ca57547702e5b40b201e27edb5bb
2011-02-15 18:10:02 -06:00
Jon Rafkind
3848e3da6c use the standard editor style to get the right colors in the line
numbers mixin. closes pr11655

original commit: 5bb72d5b0e01d022ce49ad360bc1333029c0ea56
2011-02-09 14:36:58 -07:00
David Van Horn
15c7ab6e1f Fixes more spelling errors.
original commit: 760a58b65df2b91010d2bcc2739ddab2a4489729
2011-02-04 19:44:13 -07:00
Matthew Flatt
3a9e14051b DrRacket line numbers: fix condition for whether to draw a number
original commit: 96fd11eedebc28331aa689892042742ea75039be
2011-01-28 06:22:28 -07:00
Robby Findler
97b928821b make completions box handle clicking around a little bit better
original commit: 71236aa48c1292539390899a14e4481aafd226e5
2011-01-25 20:58:50 -06:00
Robby Findler
4e61f8bb71 drop superflous dependency on srfi1
original commit: f182d0def4cb65f3089e0de167d61053279cb799
2011-01-25 20:58:47 -06:00
Robby Findler
8dd3d90602 fix sizing and font inconsistencies in the completions box
original commit: e0703e251be2c2fc62303f8376bc4bd10d3f0c60
2011-01-25 20:58:44 -06:00
Robby Findler
c9d3f9a823 fixes the way alt-enter in the drracket repl works so that it doesn't insert whitespace into the submitted expression
closes PR 11621

original commit: 7a85e942a2314822352d0a8aeeace56021e019f2
2011-01-15 16:02:23 -06:00
Robby Findler
08dbf9be69 setup hooks so that the behavior of the home / c:a keybinings delegates to a method to find where to go
then, use that to change how it works for the scheme mode (and also another variation for the REPL to
cope with the prompt)

I spent a while trying to make this work at the keymap% level (ie putting different keybindings for "home"
and "c:a" into different keymaps) but this just turned out to be far too confusing and fragile, so went
with this alternative (one keybinding, but that delegates to an overridable method)

closes PR 11446

original commit: d2cb96bcb39d93f6dac92906bed9885828663798
2011-01-09 16:22:28 -06:00
Robby Findler
ece9db9125 move the text class creation calls back to the end of the file
original commit: ad47d346bad2fdb6f5e4b8f9a5a69dda7e7b4726
2011-01-09 15:38:24 -06:00
Matthew Flatt
e7ecd69f95 line number fixes
- restore some method augments that I shouldn't have deleted
 - handle font change through a style-list callback

original commit: 9d7a7a1520d5be5ccd993dc935f1053e6160e01a
2011-01-07 13:02:33 -07:00
Matthew Flatt
4ea0968815 repairs for line numbers in DrRacket
original commit: be6ba896e04a7a0744810883774ee88fde9aa041
2011-01-07 11:57:50 -07:00
Robby Findler
a58b1541a8 remove now useless private field
original commit: 21050c24542a905daa6a29ffa04ebae58ff64228
2011-01-06 10:09:09 -06:00