216 Commits

Author SHA1 Message Date
Nathan Sobo
66319ca9c0 Merge pull request #2801 from atom/ns-react-fix-jitter
Fix jitter in React editor
2014-07-02 10:34:01 -06:00
Nathan Sobo
17fa580ecd Ignore 'scroll' events when an update is pending
This prevents feedback loops where we handle stale 'scroll' events
for scrolls requested in the model layer. It prevents jitter when
autoscrolling with the cursor.
2014-07-02 10:11:35 -06:00
Nathan Sobo
9508909a9f Don't defer updates with setImmediate in animation frames
I previously thought this was okay, but now I'm experiencing jitter when
scrolling with the trackpad when updates are deferred, and the frames
seem jagged. So this commit restores a synchronous approach to display
updates whenever we use animation frames.
2014-07-02 09:26:24 -06:00
Ben Ogle
dcb0d9b039 Update editor component specs 2014-07-01 11:41:44 -07:00
Ben Ogle
65c2f26656 Little note 📝 2014-07-01 10:54:36 -07:00
Ben Ogle
43e88f6515 Invalidate whitespace lines when their indent level changes
Refs #2376
2014-07-01 10:54:36 -07:00
Nathan Sobo
15ca3e2a40 Match existing editor's behavior for .cursor-line class 2014-06-28 15:39:22 +01:00
Nathan Sobo
ea9f5eb1c7 💄 Unify specs for all line decorations 2014-06-28 15:39:22 +01:00
Nathan Sobo
7f70b41696 Update the specs for .cursor/selection-line decorations 2014-06-28 15:39:22 +01:00
Nathan Sobo
bd238d6885 Add specs for gutter decoration options
- onlyHead
- onlyEmpty
- onlyNonEmpty
2014-06-28 15:39:22 +01:00
Nathan Sobo
fa7e388352 Add 'onlyEmpty' and 'onlyNonEmpty' decoration options 2014-06-28 15:39:21 +01:00
Nathan Sobo
a2b90cd501 Add 'onlyHead' option for decorations
It only decorates the head position of the decoration's marker.
2014-06-28 15:39:21 +01:00
Nathan Sobo
3bf0c73170 Assign line width explicitly to prevent full screen repaints
Fixes #2746
2014-06-25 19:13:50 -06:00
Nathan Sobo
eb84737109 Fix specs for use of setImmediate instead of nextTick in requestUpdate 2014-06-25 18:38:06 -06:00
Nathan Sobo
63e8099088 Allow successive accented characters to be inserted in React editor
Refs #2732

Because we're only checking the length of the input element's selection
in the React editor on textinput events and not also its content, we
were mistaking some IME compositions as accented character menu
insertions. Clearing the content of the input on 'compositionend'
prevents this issue.
2014-06-25 18:19:53 -06:00
Ben Ogle
b7d8e581ee Merge pull request #2727 from atom/bo-subscribe-to-marker-changes
Subscribe to marker changes
2014-06-24 11:15:47 -07:00
Ben Ogle
396b21bc04 Fix specs failures caused by making lines 100% width 2014-06-24 10:32:48 -06:00
Ben Ogle
ccada33d57 Remove nextTick in spec 2014-06-23 22:27:40 -06:00
Ben Ogle
1d9514ca81 Don't call nextTick within requestAnimationFrame
This seems to be causing stutter when scrolling on the GPU. When I don't
use nextTick when requesting animation frames, the problem seems to go
away. Maybe there's some issue with the integration between the Node
and Chromium event loops plus sending things to the compositor.

/cc @benogle
2014-06-23 22:21:28 -06:00
Ben Ogle
f381abcbad Re-render when a marker changes
fixes #2705
2014-06-23 16:00:36 -07:00
Ben Ogle
7139fd9f98 Conditionally render the gutter for the showLineNumbers option
Fixes #2707
2014-06-23 15:22:16 -07:00
probablycorey
9a5da3c27e Add next tick call 2014-06-23 09:13:39 -07:00
probablycorey
43cb9af4a4 Add editor-event spec 2014-06-23 08:51:17 -07:00
Nathan Sobo
7c356d2592 Revert "Render highlights on their own layer to avoid GPU artifacts" 2014-06-21 01:58:11 -06:00
Nathan Sobo
d839ea9aa5 Don't render an opaque background behind line numbers
It doesn't help subpixel anti-aliasing like I thought, so screw it.
2014-06-20 16:07:19 -06:00
Nathan Sobo
68d0a99c6e Default EditorComponent to updating synchronously in specs
This commit adds a static property, EditorComponent.performSyncUpdates,
which can be used to control the update behavior of all editor
components. In addition, an instance property called performSyncUpdates
be assigned to control the update behavior of a specific instance.
2014-06-20 15:06:16 -06:00
Nathan Sobo
64f3938f5c Batch all editor updates together automatically via process.nextTick 2014-06-20 15:06:10 -06:00
Ben Ogle
72b1821828 Render line decorations. 2014-06-19 17:20:05 -07:00
Ben Ogle
85abed2406 Merge pull request #2676 from atom/bo-cursor-gutter
Don’t render decorations on the last empty line when selection not empty
2014-06-19 15:10:18 -07:00
Ben Ogle
520ece4b13 💄 Wording 2014-06-19 15:09:49 -07:00
Ben Ogle
184068dc55 Add handlers for IME composition 2014-06-19 15:03:34 -07:00
Ben Ogle
908a2978ae Don’t render decorations on the last empty line when selection not empty 2014-06-19 14:20:32 -07:00
Ben Ogle
bee4c9df8a Revert "Select to the end of the last row rather than beginning of row + 1"
This reverts commit c5815d2af9.
2014-06-19 12:06:09 -07:00
Ben Ogle
c5815d2af9 Select to the end of the last row rather than beginning of row + 1 2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo
8295019891 Throw error when no animation frame was requested 2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo
2edcc517b1 Handle dragging in the gutter
Including shift-click dragging better than the old editor!!!!!!
2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo
9083103bb3 Add click and shift-click in gutter 2014-06-19 12:04:36 -07:00
Ben Ogle & Nathan Sobo
bc391094df 💄 Move helper 2014-06-19 12:03:18 -07:00
Kevin Sawicki
1e1f4cf173 Merge pull request #2662 from atom/ks-align-hard-tabs
Align hard tabs
2014-06-19 09:41:15 -07:00
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
f22e4225c3 Break into separate specs for lineHeight, fontSize, and fontFamily 2014-06-19 03:35:35 -06:00
Kevin Sawicki
ad9e2ab869 Update specs where tab is now only 1 space 2014-06-18 16:48:00 -07:00
Ben Ogle
02757fc2de 💄 2014-06-18 14:22:05 -07:00
Ben Ogle
d5ea766541 Make click of fold marker unfold the row 2014-06-18 14:07:55 -07:00
Ben Ogle
7a9710b8c3 Add fold markers to folded lines
Fixes #2634
2014-06-18 13:47:38 -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
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
Ben Ogle
a7ec7497e2 nof 2014-06-17 17:09:26 -07:00