Commit Graph

60 Commits

Author SHA1 Message Date
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
Robby Findler
0d6b825377 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!
2012-03-24 20:20:05 -05:00
Asumu Takikawa
04f7bdbb02 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.
2012-03-01 13:17:48 -05:00
Sam Tobin-Hochstadt
e3609cdb32 Refactor and improve fuzzy searching in completion. 2012-01-13 14:39:05 -05:00
Robby Findler
950d165133 fix the not-a-language message so that the styles in the REPL are right 2012-01-06 20:59:34 -06:00
Robby Findler
458e2c2282 some long overdue Rackety: renaming the 'scheme:' exports of the framework to 'racket:' 2011-11-30 06:45:50 -06:00
Robby Findler
081dc6c9a1 adjust the completions box so that it doesn't raise the error mentioned in 12396 anymore
closes PR 12396
2011-11-26 18:30:25 -06:00
Sam Tobin-Hochstadt
0754e6b702 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.
2011-11-13 16:33:17 -05:00
Robby Findler
fcc720f43e adjust uses of after-load-file to use the success? flag 2011-10-08 10:50:27 -05:00
Robby Findler
b71e562284 fix crlf mode initialization 2011-10-01 08:10:25 -05:00
Robby Findler
4a2757f200 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
2011-09-30 17:08:07 -05:00
Ryan Culpepper
c7f86d276c removed useless requires 2011-09-27 19:28:44 -06:00
Robby Findler
2ec720176a 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
2011-09-22 10:51:47 -05:00
Robby Findler
38596a9b58 manage the state for delegates better (used by the drracket contour window)
closes PR 12094
2011-08-07 18:39:22 -05:00
Robby Findler
29a843ac37 get rid of a broken attempt to optimize the 20,000-ft overview refreshing
closes PR 12083
2011-08-03 09:58:23 -05:00
Robby Findler
524d533392 added edit-sequence when flushing the delegate updates 2011-06-17 15:46:52 +08:00
Robby Findler
24d11805ac attempt to try to make the contour window feel faster by delaying the work until nothing has happened for 250 msec 2011-06-17 12:43:14 +08:00
Jon Rafkind
576916d4d7 line numbers separator uses the same color as the text 2011-04-04 13:07:25 -06:00
Robby Findler
8e94ce49e4 lift the restriction that the text:ports mixin
cannot do io from the eventspace handler thread
and add a test suite for text:ports
2011-02-15 18:10:02 -06:00
Jon Rafkind
5bb72d5b0e use the standard editor style to get the right colors in the line
numbers mixin. closes pr11655
2011-02-09 14:36:58 -07:00
David Van Horn
760a58b65d Fixes more spelling errors. 2011-02-04 19:44:13 -07:00
Matthew Flatt
96fd11eede DrRacket line numbers: fix condition for whether to draw a number 2011-01-28 06:22:28 -07:00
Robby Findler
71236aa48c make completions box handle clicking around a little bit better 2011-01-25 20:58:50 -06:00
Robby Findler
f182d0def4 drop superflous dependency on srfi1 2011-01-25 20:58:47 -06:00
Robby Findler
e0703e251b fix sizing and font inconsistencies in the completions box 2011-01-25 20:58:44 -06:00
Robby Findler
7a85e942a2 fixes the way alt-enter in the drracket repl works so that it doesn't insert whitespace into the submitted expression
closes PR 11621
2011-01-15 16:02:23 -06:00
Robby Findler
d2cb96bcb3 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
2011-01-09 16:22:28 -06:00
Robby Findler
ad47d346ba move the text class creation calls back to the end of the file 2011-01-09 15:38:24 -06:00
Matthew Flatt
9d7a7a1520 line number fixes
- restore some method augments that I shouldn't have deleted
 - handle font change through a style-list callback
2011-01-07 13:02:33 -07:00
Matthew Flatt
be6ba896e0 repairs for line numbers in DrRacket 2011-01-07 11:57:50 -07:00
Robby Findler
21050c2454 remove now useless private field 2011-01-06 10:09:09 -06:00
Robby Findler
c94ad960ac ask about normalizing pastes only after pasting has finished (in case there are multiple calls to insert)
closes PR 11449
2011-01-06 08:39:32 -06:00
Matthew Flatt
c9d2f43398 fix line-number mixin 2011-01-05 09:57:33 -07:00
Jon Rafkind
6c3feabb52 restore dc state after calculating the clipping area 2011-01-04 22:24:36 -07:00
Jon Rafkind
d7ac9c4399 sest the line number padding when the editor changes. calculate the position to draw at better 2011-01-04 22:16:52 -07:00
Robby Findler
7eb3e8c28a change drracket and framework so they don't rebind printf anymore
(instead binding oprintf to print to the original output port of drracket)
2011-01-02 10:03:24 -06:00
Jon Rafkind
11494ce8b9 use padding instead of manually moving the origin 2010-12-31 19:29:34 -07:00
Robby Findler
4e40efaf37 framework: sometimes put the text completion menu above the line instead of below it
closes PR 10829
2010-12-28 07:33:26 -06:00
Robby Findler
f849f25272 Rackety 2010-12-28 07:33:24 -06:00
Robby Findler
4c796a6445 added a 'fast path' check that speeds up the coloring phrase of check syntax by 3x on drracket/private/rep.rkt under windows
(thank you Eli's profiler!)
2010-12-20 12:22:46 -06:00
Jon Rafkind
ee62bae74b save/restore dc state while drawing line numbers 2010-11-14 19:48:21 -07:00
Jon Rafkind
d920cdc945 set pen to black so the line separator is drawn in the right color 2010-11-08 18:10:08 -07:00
Jon Rafkind
96018f258c check last-line + 1 2010-11-07 12:19:49 -07:00
Jon Rafkind
74fce96d92 add dx offset when drawing 2010-11-07 12:06:34 -07:00
Jon Rafkind
e0e3870a62 dont modify positions if line numbers arent being shown 2010-11-05 15:43:20 -06:00
Jon Rafkind
a698d89a75 adjust x position when finding editor locations 2010-11-05 15:15:01 -06:00
Jon Rafkind
c0d504b7b8 use a lighter color for same paragraph lines 2010-11-04 11:56:36 -06:00
Jon Rafkind
9742f896f9 right align numbers 2010-11-04 11:56:36 -06:00
Jon Rafkind
d1e44d0cc8 set minimum line width to accept 100 lines 2010-11-03 17:59:40 -06:00
Jon Rafkind
c3111c425b allow line number width to increase automatically 2010-11-03 17:58:18 -06:00