Nathan Sobo
388763e7cd
Wait to measure characters if editor is hidden
...
Also, when characters *are* measured, request a display update
2014-06-19 04:19:51 -06:00
Nathan Sobo
609855af3c
Decide to measure gutter's width in gutter
...
The gutter is in a better position to determine if the max line number
length has changed because it's a property that gets passed in so we
can compare current with previous.
Fixes #2659
2014-06-18 21:07:13 -06:00
Ben Ogle
d5ea766541
Make click of fold marker unfold the row
2014-06-18 14:07:55 -07:00
Nathan Sobo
8d87eb2ed6
Style the .line-numbers div to be compatible w/ both themes and the GPU
...
The .line-numbers div has to have an opaque background because it's
sent as a texture to the GPU, and otherwise it will have isuses with
subpixel antialiasing.
However, themes style the background of the .gutter div, which was
getting obscured by the opaque background of the line numbers. This
commit adds the .gutter class to the .line-numbers div as well and
ensures it always fills the entire height of the editor.
2014-06-18 12:36:40 -06:00
Nathan Sobo
53c363b853
Merge pull request #2615 from adnelson/feature/delete-to-end-of-line
...
added delete to end of line
2014-06-18 10:46:48 -06:00
Corey Johnson
2e73a46cbc
Merge pull request #2603 from atom/cj-expose-resizing-to-editor
...
Expose resizing to editor
2014-06-18 09:19:43 -07:00
Ben Ogle
e89e2141d7
Merge pull request #2605 from atom/bo-ns-highlights
...
Add highlight decorations
2014-06-17 17:42:18 -07:00
probablycorey
ff0cddfd1d
Merge remote-tracking branch 'origin/master' into cj-expose-resizing-to-editor
2014-06-17 17:22:10 -07:00
Nathan Sobo
2fffbba503
Eliminate Decoration class and use plain objects instead
2014-06-17 17:35:56 -06:00
probablycorey
9be1427891
Request scrollView measurement on resize events
2014-06-17 16:25:47 -07:00
Corey Johnson & Nathan Sobo
068c1e6249
Use polling to detect editor resize
2014-06-17 16:07:07 -07:00
Corey Johnson
f3a4d32a32
Remove width setting of overflowExpander
2014-06-17 14:07:26 -07:00
Nathan Sobo
99ba20ae0d
Don't render empty highlights
2014-06-17 14:47:12 -06:00
Corey Johnson
0255e44f00
Remove suppressUpdates
2014-06-17 13:38:08 -07:00
Nathan Sobo
4832d36ac1
Rename filterDecorationsByScreenRow to getLineDecorations
...
Also rename local variable to lineDecorations for clarity
2014-06-17 14:35:56 -06:00
Nathan Sobo
5d15af943e
Rename filterDecorationsByMarkerId to getHighlightDecorations
...
And rename local variable to highlightDecorations to clarify intent
2014-06-17 14:31:56 -06:00
Corey Johnson
0a671fc386
Add a div that triggers overflowchanged events on resize
2014-06-17 13:28:05 -07:00
Nathan Sobo
14bed8a3c8
Merge pull request #2587 from atom/bo-ns-input-handling
...
Handle textInput events in a way that works with autocomplete-plus
2014-06-17 10:11:34 -06:00
Ben Ogle
34ec15862f
Filter decorations in the components.
...
This reduces the number of intermediate objects we need to create. The
downside is a bit more code complexity in the components.
2014-06-16 16:54:21 -07:00
Ben Ogle
5259d5b750
Dont render invalid highlight decorations
2014-06-16 15:40:54 -07:00
Ben Ogle
4f2f158d0d
Make selection updating work properly
2014-06-16 15:36:09 -07:00
Ben Ogle
351dc58354
Remove getSelectionScreenRanges()
2014-06-16 15:36:09 -07:00
Ben Ogle
2867dd98e5
Remove getGutterDecorations()
2014-06-16 15:36:09 -07:00
Ben Ogle
32a0804b9a
Remove Decorations object
2014-06-16 15:36:09 -07:00
Ben Ogle
408e62a993
Pass highlightDecorations into the HighlightsComponent
2014-06-16 15:36:08 -07:00
Ben Ogle
d4057d21c7
Pass the decoration hash into the gutterComponent
2014-06-16 15:36:08 -07:00
Ben Ogle
1ebdd801f5
Use decorations to render selections
2014-06-16 15:36:08 -07:00
Ben Ogle
2d4360dcf0
Decorations can now only be attached to markers.
...
The basics work. It will render them on the gutter.
2014-06-16 15:36:08 -07:00
Ivan Zuzak
6c9df6d91a
Handle mousedown events only for left button in editors
2014-06-16 19:57:58 +02:00
Allen Nelson
fc462fcd21
added delete to end of line
2014-06-16 10:59:55 -05:00
Nathan Sobo
9e6756ed6d
Don't perform an update in response scroll view dimension changes
...
We always measure the scroll view in the ::componentWillUpdate hook, so
performing *another* update in response to the measurement causes an
invariant violation in react. Whenever we are measuring, we are always
already updating.
2014-06-13 17:07:41 -06:00
probablycorey
8d84a97b2b
Move scroll view measurements to componentWillUpdate
2014-06-13 11:36:40 -07:00
Corey Johnson
e96d2dbd17
Add the simplest resize fix that will work.
2014-06-12 16:17:45 -07:00
Ben Ogle
1bdf45f7d6
Fix gutter width
...
When you had a 1000 line file and you fold everything
into 10 lines, it would make the gutter width only large
enough for the 10 lines, so line 999 wouldnt properly
fit in the gutter.
Refs #2423
2014-06-11 17:28:12 -07:00
Ben Ogle & Nathan Sobo
4569b76dd5
Don't call preventDefault for spaces to prevent browser scrolling
2014-06-11 17:16:19 -06:00
Ben Ogle & Nathan Sobo
1c410cbf5a
Handle textInput events in EditorComponent instead of on InputComponent
...
This commit also changes input handling to be more like it was in the
previous editor. We're using textInput rather than input events because
they are emitted *before* characters are inserted, enabling much simpler
detection of characters inserted via the accented-character menu on
OS X.
Previously I avoided this because something about it was causing reflows
in the old editor, but in this editor that doesn't seem to be a problem,
and it's actually faster.
2014-06-11 16:40:46 -06:00
Ben Ogle
87915f70e2
editor.scrollSensitivity option
2014-06-11 12:07:49 -07:00
Ben Ogle
ec07cb9524
Slow the scroll speed
2014-06-11 12:07:48 -07:00
Nathan Sobo
1b4426e3ba
Don't pause overflowchanged events after React editor updates
...
Fixes #2237
Previously, operations such as typing and scrolling were triggering
overflowchanged events on the editor, which concerned me because we
were performing lots of unnecessary measurements of the scroll view.
Now that we draw extra lines above and below the visible screen row
range, this doesn't happen, so we can remove this pausing code which
was delaying the resizing of the editor in certain situations.
2014-06-11 12:07:05 -06:00
Corey Johnson
94dd1eed54
Merge remote-tracking branch 'origin/master' into cj-add-react-editor-shims
...
Conflicts:
src/editor-component.coffee
2014-06-11 08:56:27 -07:00
Nathan Sobo
1b026cc805
Set is-focused class on React editor's wrapper view for now
2014-06-11 08:37:16 -06:00
Nathan Sobo
b73d267a5f
Merge branch 'master' into cj-add-react-editor-shims
2014-06-11 07:34:41 -06:00
Nathan Sobo
5add0e4f70
Don't forceUpdate in setImmediate callback if editor is unmounted
...
This was throwing errors in the EditorComponent spec.
/cc @benogle, just so you're aware
2014-06-11 07:21:05 -06:00
Nathan Sobo
131aad24c0
Merge branch 'master' into cj-add-react-editor-shims
2014-06-11 06:48:16 -06:00
Nathan Sobo
64870c733b
Add API for enabling/disabling input to support vim-mode's insert mode
2014-06-11 06:07:41 -06:00
Nathan Sobo
68ca6a0a0d
Merge pull request #2532 from karlin/select-paragraphs
...
Adds select-to-beginning-of-next/previous-paragraph commands
2014-06-11 05:39:30 -06:00
probablycorey
9e7e77bdf8
Merge remote-tracking branch 'origin/master' into cj-add-react-editor-shims
...
Conflicts:
src/gutter-component.coffee
2014-06-10 15:42:23 -07:00
Nathan Sobo
562a047b9e
Only requestUpdate when scrolling stops if component is still mounted
...
Fixes #2566
2014-06-10 12:13:57 -06:00
Ben Ogle
5db163a328
💄
2014-06-09 16:01:29 -07:00
Ben Ogle
756347a716
Add has-selection class to the editor div when there is a selection
2014-06-09 15:45:32 -07:00