Commit Graph

1610 Commits

Author SHA1 Message Date
Burke Fetscher
d6166b1499 ACII art boxes keybinding - look a little harder for the box
original commit: 8562310f38fb5686c0425907c8e198cd119a7d8f
2013-01-15 16:53:41 -06:00
Robby Findler
ee69fc413c move the ╬ char and friends into a separate file
do not merge to 5.3.2

original commit: 1edec6a33ed3a98b95a233f6be90d40fd8e1dfc0
2013-01-15 09:08:02 -06:00
Robby Findler
2940bac035 add missing inner call
original commit: 12d670b5a3b792ee3c343d311521e54848708f40
2013-01-05 17:31:07 -06:00
Robby Findler
783eefb38a try to make the colorer more friendly when there is an unclosed
edit sequence

(ie make it not take over the cpu)

original commit: c907368e0fe92f943d6fccf88fa02fc21ee1e952
2013-01-05 17:31:07 -06:00
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
6e463f0d8d adjust the framework to avoid
calling the error-display-handler when reporting
problems saving files

closes PR 13403

original commit: aa5f2e7875827ab4549830339de52641cfc86836
2013-01-03 20:47:19 -06:00
Robby Findler
67467bc32e clean up autosave a little
guard more of the filesystem manipulations with
handlers and log errors instead of letting them
be raised and show up as internal errors

related to PR 13403

original commit: 94b54db11823b4683234424174aca2836d422204
2013-01-03 20:47:17 -06:00
Robby Findler
80c2e9bac9 check the result of find-ls in the one place it wasn't being checked
probably closes 13404

original commit: 0e763f5b01a18f04f23e07f74d5b04d42a67fc17
2013-01-01 15:01:13 -06:00
Robby Findler
c344fd47cd fix commit c818eb3ca3325fb7eac7f2a8105ea0121013214c
related to PR 13394

original commit: a948f1b40dacd3f583a6034a58b12962f6941983
2012-12-31 11:52:36 -06:00
Robby Findler
79f015eb70 Fix the new lexer interaction when some of the lexer states were
finished, but not all. Don't re-do them the next time around

closes PR 13394

original commit: c818eb3ca3325fb7eac7f2a8105ea0121013214c
2012-12-29 23:56:38 -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
55c99c6554 adjust ascii-box => unicode-box algorithm so that
it only looks left and right at hyphens and only
up and down at pipes, etc. This better handles the
case where you have something like this:

  +--------------+
  | (<= a-x b-y) |
  +--------------+

Before this commit, it would have adjusted the hypens
inside the identifiers

original commit: 6a69da76e2f9e5b2105dee89535d5ace4defed92
2012-12-24 13:49: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
021c4b97d8 clean up ascii art => unicode a little
adjust the way it changes characters so it
doesn't change them when they are already the right
thing (this means set-modified is not always called
and also improves performance in the case that little
changes in a big diagram)

original commit: 5a9c5f681b11d563275f7672c3af5160bb68113c
2012-12-24 12:29:57 -06:00
Robby Findler
8109170a3a add an ASCII art rectangle => unicode rectangle keybinding to drracket
original commit: 042bbbefe76bb005a008d2b487faacd1c9ecbcd3
2012-12-24 11:38:54 -06:00
Robby Findler
85fa4bbcb7 fix a switchable button / discrete-sizes panel interaction bug
also clean up the code a bit (make sure the h? argument to
set-label-visible is really a boolean and make some of the
long lines narrower)

original commit: ccae98777a15c67f04f1ba5d54ad577acb7994dd
2012-12-23 09:52:55 -06:00
Robby Findler
07a454393a export preferences:add-check
original commit: 84057ce3d59c7bcb5c92f28b12d832b80e9d3e00
2012-12-21 22:07:57 -06:00
Robby Findler
8281814528 drracket tracks the frame position and size on a
per-monitor-configuration basis and (possibly) moves/resizes
the frame when it changes

original commit: 2fced5d7d6f82fae93033099d448d01ea66dc93e
2012-12-21 19:22:59 -06:00
Robby Findler
366a8a31ff improve the performance of typing a close paren
original commit: 0b095382ca537a95fa9fb37a866337006210553a
2012-12-15 15:13:26 -06:00
Nadeem Abdul Hamid
827dc1286d fix close parens behavior in interactions and comments
original commit: c0a412ed0ef9a4e5e3529569ce1f171d8bd10378
2012-12-04 20:39:10 -06:00
Robby Findler
ba24e8fa61 fix query-aspell so that it returns an empty list when aspell isn't working
original commit: 9f72eb396a62bb72bebcdb1937ae59e0e15195fc
2012-12-02 14:43:57 -06:00
Robby Findler
8e341da412 update the delegate text when showing and hiding the 20,000 overview window
closes PR 13311

original commit: 63081b0671cc16d1159cd2e6285665b11b9d9658
2012-12-01 16:52:45 -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
915918282f fix color prefs saving to use alpha
This didn't matter much before but now that
paren colors have interesting alpha components,
things look bad when it is ignored!

original commit: f5efc0313435c922914ccd924d876ffe8b740e80
2012-12-01 13:47:02 -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
992b544ab7 Adjust DrRacket so the window can get narrower
For example, a new DrRacket window (with a file named tmp.rkt in the
and 356 afterwards.  This is under mac os x with, I believe, the
default system font sizes. (The file is important because different
languages can have different buttons in the toolbar and the filename's
length itself can affect the minimum size.)

Mostly this change is the addition of a new kind of panel that
lets its children have multiple fixed sizes (as opposed to
just a single minimum size and (optionally  arbitrarily large))
It also adjusts the various toolbar buttons to use this new code.

Also, there's a few tweaks to shrink other things that became the
limiting factor in shrinking the width of the DrRacket window.

Currently, at least for #lang racket programs, the toolbar buttons
along the top of the window are the limiting factor (including the
save button).  With a bogus language (ie, #lang rackeeet), the bottom
bar is the limiting factor, since that will have only the Save, Run,
and Stop buttons.

related to PR 13281

original commit: 993cd40208b040bfce9db649a59ff7bb9e95de2d
2012-11-29 09:43:05 -06:00
Robby Findler
d35f4ceebd adjust the anchor message, keyboard recording message, and overwrite
message so they don't take up space when they aren't being shown
(to reduce the minimum width of the window)

original commit: a45f94b58ba2aee49c830ecc6379b23ace0c9b16
2012-11-29 09:43:05 -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
Danny Yoo
5bc070d1d8 Optimize stick-to-next-sexp? to speculative match before using forward-match.
Profiler output suggests that forward-match is a bit expensive.  Here
is profiler output from the original code, when profiler is wrapped
around tabify-selection:

------------------------------------------------------------------------------------------------------------
                                  loop [34]                                                             0.1%
                                  get-backward-sexp method in ...k/private/racket.rkt:425:2 [28]       99.9%
 [37] 50648(61.1%)     0(0.0%)  stick-to-next-sexp? method in ...k/private/racket.rkt:425:2 ...
                                  do-forward-match method in ...rk/private/color.rkt:71:2 [50]         99.9%

...

------------------------------------------------------------------------------------------------------------
                                  get-forward-sexp method in ...k/private/racket.rkt:425:2 [38]        17.1%
                                  stick-to-next-sexp? method in ...k/private/racket.rkt:425:2 [37]     82.9%
 [50] 61043(73.6%)    53(0.1%)  do-forward-match method in ...rk/private/color.rkt:71:2 ...
                                  colorer-driver method in ...rk/private/color.rkt:71:2 [66]           99.8%
                                  match-forward method in paren-tree% [72]                              0.1%
------------------------------------------------------------------------------------------------------------

The patch does the prerequisite string matching before calling forward-match.

Reference to dev list: http://lists.racket-lang.org/dev/archive/2012-November/010976.html

original commit: 43b0e2157c5247653da96d24dee833be429c4bfc
2012-11-26 13:42:49 -07: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
c347ec91c2 tweak to Nadeem's commit
original commit: 49a0b950b79b0f20095d73b690a84c93c39920d6
2012-11-25 22:07:28 -06:00
Nadeem Abdul Hamid
02d9926410 automatic parenthesis mode improvements
Handle close parentheses in a smarter way while in
auto-parens mode and be a little more smart about
inserting brace pairs in general.

In summary:

 - Add some "smart-skip" behavior to insert-close-paren,
   described in the documentation.
    - When auto-parens mode is enabled,
      the existing "balance-parens" keybinding invokes
      insert-close-paren with a smart-skip argument of
      'adjacent
    - A new "balance-parens-forward" keybinding invokes
      insert-close-paren with a smart-skip argument of
      'forward (whether or not auto-parens mode is
      enabled)

 - Enable basic smart-skip behavior for
   strings ("...") and |...| pairs, specifically, typing
   a double-quote or bar character when the cursor
   immediately precedes one causes the cursor to simply
   skip over the existing one

 - Tweak auto-insertion of block comment pairs; i.e.
   typing hash and a bar results in a properly balanced
   #||# pair. Also, when you type a bar character when
   the cursor immediately precedes a closing bar and
   hash of a comment, then the cursor skips over both
   characters (this seems better than having it just
   skip over the bar, and then having to introduce a
   new keybinding to detect when a hash is typed while
   the cursor is between a bar and a hash)

 - In strings and line/block comments, auto-parens mode
   no longer has any effect (you can still use the M+..
   keybindings to force insertion of a particular brace
   pair)

 - Detect when a character constant is being typed, and
   don't insert brace pairs if so; i.e. if the cursor
   is immediately after #\ , then typing any open parens,
   double quote, or bar, does _not_ result in the
   insertion of an open/close pair even in auto-parens
   mode

 - Add a bunch of tests related to auto-parens, matching
   pairs of braces, strings, comments, etc. to
   collects/tests/framework/racket.rkt

original commit: 8f3343cd0129001aa9c7ce263f58e8ed4929c15c
2012-11-25 21:57:52 -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
33826c1585 fix a coloring bug
also, add a little more logging to the aspell logging info

original commit: 793ee71e69dda5924b59a95ce1a3b7492331b2ac
2012-11-24 14:05:45 -06:00
Robby Findler
4c11468ec8 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

original commit: 11a5721b59d1400900d67f825470e6ee6f7d6b8a
2012-11-22 20:35:06 -06:00
Robby Findler
df61dc8953 added spelling dictionary support
related to PR 13242

original commit: 5b18645a9a5f1646d69f6d3ff1b761cb7def3e65
2012-11-22 19:24:22 -06:00
Robby Findler
2398f08ed5 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

original commit: 6fff8a3030bfaddd0eb8113c9f67d6b7e70500ff
2012-11-22 17:33:34 -06:00
Robby Findler
3fdd763928 fix c:c;c:b so it removes {}s
closes PR 13211

original commit: 316bbcb038bc1472c71b4bdd58972e86a3776c30
2012-11-22 10:25:57 -06:00
Robby Findler
469e4203dc fix dynamic require for moved file
original commit: d5f605f58d4fc99ee2b17b0f44f20f0a8c9b72fe
2012-11-22 09:27:07 -06:00
Robby Findler
80950cd990 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.

original commit: d0ce0de3988f02c5b260aa663fac95134b877761
2012-11-16 14:33:17 -06:00
Robby Findler
1a5c4047dc 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)

original commit: 6fc70a04d8b69f41d82c3bcbeeff26254017052d
2012-11-16 14:33:00 -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
67660d780d move follow-log.rkt to tests/drracket
original commit: 12e8332c55db0e1eb805cbc00760130886068190
2012-11-16 07:26:38 -06:00
Robby Findler
2b2ef68523 fix bad require in follow-log.rkt and add some more histogram utils
original commit: d11f63bd466814e0a51f81899350805731263f2e
2012-11-15 12:22:13 -06:00