Commit Graph

8840 Commits

Author SHA1 Message Date
Corey Johnson & Nathan Sobo
068c1e6249 Use polling to detect editor resize 2014-06-17 16:07:07 -07:00
Ben Ogle
d8240628a7 Update doc comments 2014-06-17 14:53:11 -07:00
Corey Johnson
f3a4d32a32 Remove width setting of overflowExpander 2014-06-17 14:07:26 -07:00
Nathan Sobo
edadedce7b Give highlight decorations unique id's to avoid potential React errors
Using the marker's id plus the decoration class can cause an error in
the event we apply a decoration with the same class twice to the same
marker. This is admittedly unlikely, but I think it's cleaner to just
allocate unique id's for decoration objects.
2014-06-17 15:03:45 -06: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
Ben Ogle
ef09fbbfb2 Remove softWrap decoration option 2014-06-17 11:24:27 -07:00
Allen Nelson
ef7f0ed9ed updated docstring 2014-06-17 12:18:34 -05: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
Kevin Sawicki
d0513cb95d 📝 Doc optional param and default property value 2014-06-17 08:49:57 -07: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
5b84aa7b18 💄 per nathan’s request 2014-06-16 16:06:18 -07:00
Ben Ogle
7ba498a170 Fix id generation 2014-06-16 16:06:01 -07:00
Ben Ogle
5259d5b750 Dont render invalid highlight decorations 2014-06-16 15:40:54 -07:00
Nathan Sobo
2c04bff0fa Only return decorations for markers intersecting the screen row range
This relies on a fix to the interval-skip-list provided with the upgrade
to text-buffer@2.4.0.
2014-06-16 15:36:09 -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
031ec9798a No more typeless decorations
Now you can specify a list of types with your decoration.
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
084632a985 Rename Selection(s)Component to Highlight(s)Component 2014-06-16 15:36:08 -07:00
Ben Ogle
b028673b5d Only render on updates 2014-06-16 15:36:08 -07:00
Ben Ogle
6394814142 Make foldable decorations work again 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
Ben Ogle & Nathan Sobo
7142022f05 Add intersection support to DisplayBuffer::findMarkers 2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
25520a4cad Add containedInScreenRange to DisplayBuffer::findMarkers 2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
56da6399b8 Add startScreenRow and endScreenRow to DisplayBuffer::findMarkers 2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
a7379b067a Use ::getMarker for fold decorations instead of new DisplayBufferMarker 2014-06-16 15:36:07 -07:00
Allen Nelson
8411d41621 deleting only selection if selection is not empty 2014-06-16 16:13:40 -05: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
Philip Schatz
2fdcf7a124 remove duplicate context menu entries 2014-06-13 21:30:55 -04: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
Nathan Sobo
e26ab5513f Don't assign scrollLeft on model on 'scroll-left-changed' events
Fixes #2513

I'm not entirely sure why, but for some reason we're getting into an
feedback cycle when the scrollLeft position changes in certain cases. In
theory, this shouldn't happen because reassigning the same value
shouldn't emit a change event. But since we're about to end-of-life the
jQuery editor, I'd like to try fixing it this way for now.
2014-06-12 17:01:12 -06:00
Corey Johnson
4186a4943b Remove react shims deprecations 2014-06-12 14:53:09 -07:00
Corey Johnson
e179860519 Merge pull request #2571 from lee-dohm/bug-2526
Change line commenting to uncomment if all non-blank lines are commented out
2014-06-12 08:45:47 -07:00
Ivan Žužak
43f8596fb1 Merge pull request #2584 from atom/iz-fix-tab-unindent
Outdent only if a tab is matched at the start of the line
2014-06-12 17:39:23 +02:00
Ben Ogle
2c7d01e398 Merge pull request #2588 from atom/bo-fix-page-up-down
Fix pageUp and pageDown in the react editor
2014-06-11 17:30:59 -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
7e6e61905b Move the cursor on pageUp / pageDown
Previously it was only moving the scrollTop, but not the cursors. 
Affected on the react editor.

Refs #2423
2014-06-11 17:19:59 -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