Commit Graph

8417 Commits

Author SHA1 Message Date
probablycorey
1e6e804ebb Use screen line count to determine renderedEndRow 2014-05-20 11:37:32 -07:00
probablycorey
c999a6e0e4 Show carriage return invisibles 2014-05-20 10:38:01 -07:00
probablycorey
9b5593d020 Put EOL invisibles into their own scope 2014-05-19 17:27:59 -07:00
probablycorey
4d642b91ef Only pass invisibles through to the line component if needed 2014-05-19 17:10:36 -07:00
probablycorey
73ce81d597 Pass invisibles down to lines component 2014-05-19 16:56:53 -07:00
probablycorey
09e4c585aa Add setInvisibles method 2014-05-19 16:56:17 -07:00
probablycorey
cbe07b49aa Add basic invisible specs 2014-05-19 16:20:51 -07:00
Nathan Sobo
d2bc7ab192 Merge pull request #2258 from atom/ns-react-scroll-perf
Improve scroll performance of the React editor
2014-05-19 14:42:18 -06:00
Nathan Sobo
795399e184 Preserve the target when scrolling w/ mousewheel on editor lines 2014-05-19 14:17:09 -06:00
Nathan Sobo
37bdfb716b Preserve the target when scrolling w/ mousewheel in gutter
Removing the target of a mouseweel event messes up velocity scrolling
with the track pad, so it needs to be preserved until scrolling ceases.
2014-05-19 14:03:34 -06:00
Kevin Sawicki
314833bbac Add missing parens on indent guide check
Previously the indent guide was always showing on the whitespace only lines

Closes #2274
2014-05-19 08:52:06 -07:00
Nathan Sobo
8e65d30a84 Compute rendered row range once in EditorComponent and pass it down 2014-05-16 20:58:40 -06:00
Corey Johnson
9ca506de4b Merge pull request #2173 from Locke23rus/issue-1791
💄 Deprecate backspaceToBeginningOf{Word,Line}
2014-05-16 15:13:44 -07:00
probablycorey
532f119b9d Add application:install-update to workspaceView 2014-05-16 15:05:19 -07:00
Nathan Sobo
c058483422 Update the gutter width when the number of digits changes 2014-05-16 15:56:18 -06:00
Nathan Sobo
57e6419d1d Restore conditional loading of react editor renderer 2014-05-16 15:31:16 -06:00
Nathan Sobo
9b7547cbe0 Get indent guide specs passing again 2014-05-16 15:31:16 -06:00
Nathan Sobo
e74dfe3438 Fix gutter specs and update lines when digit counts change 2014-05-16 15:31:16 -06:00
Nathan Sobo
fe82e3e30f Only clear screen row caches on lines component if lineHeight changes 2014-05-16 15:31:16 -06:00
Nathan Sobo
6017b73acf Add ability to look up line nodes by screen row 2014-05-16 15:31:15 -06:00
Nathan Sobo
0334177696 Make lineOverdrawMargin a property 2014-05-16 15:31:15 -06:00
Nathan Sobo
54cec0a5ff Hold the gutter's width with a dummy line number 2014-05-16 15:31:15 -06:00
Nathan Sobo
c5fa2bf12d Attach views to .lines instead of defunct .scroll-view-content 2014-05-16 15:31:15 -06:00
Nathan Sobo
bc8a1756f3 Use the .selections layer as the underlayer 2014-05-16 15:31:15 -06:00
Corey Johnson & Nathan Sobo
3f01e2f748 Implement shouldComponentUpdate for SelectionsComponent 2014-05-16 15:31:15 -06:00
Nathan Sobo
7dfe829fc8 Style lines with inline styles for performance 2014-05-16 15:31:15 -06:00
Nathan Sobo
c87bc57f9e Don't update top positions of lines/lineNodes unless they have changed 2014-05-16 15:31:15 -06:00
Nathan Sobo
89bd241a78 Always run react in dev mode for now 2014-05-16 15:31:14 -06:00
Nathan Sobo
d15fd34f7a Render selections on lines layer; don't put each line number on GPU 2014-05-16 15:31:14 -06:00
Nathan Sobo
a118cdd32b Put selections and lines on the GPU together in sibling divs 2014-05-16 15:31:14 -06:00
Nathan Sobo
3a2de9c698 Don't render every line on the GPU
Opaque lines are turning out to be a total pain, plus they ruin absolute
positioning on the lines div. The slight speed boost isn't seeming worth
it anymore.
2014-05-16 15:31:14 -06:00
Nathan Sobo
c60e5d90fd 💄 2014-05-16 15:31:14 -06:00
Nathan Sobo
e9bff37e06 Render line numbers manually 2014-05-16 15:31:14 -06:00
Nathan Sobo
695f8da3c3 💄 extract buildLineInnerHTML method 2014-05-16 15:31:14 -06:00
Nathan Sobo
ea5c5c9e84 Move line HTML generation into lines component 2014-05-16 15:31:14 -06:00
Nathan Sobo
4f9108980f WIP: Manually update line nodes when scrolling 2014-05-16 15:31:14 -06:00
Nathan Sobo
8148e4e50d Skip selection restoration on our fork of react 2014-05-16 15:31:14 -06:00
Nathan Sobo
f07a832c83 Sync cursor animations when cursors are added 2014-05-16 15:31:14 -06:00
Nathan Sobo
070d239f41 Blink cursors with a CSS animation
Now that they're on their own layer, I don't think it affects the
repaint timing when typing on lines (if it ever did).
2014-05-16 15:31:13 -06:00
Nathan Sobo
9b02055db9 Move selection background region calculation into React component 2014-05-16 15:31:13 -06:00
Nathan Sobo
0162247bd7 Precompute selection regions for all lines
This is easer to reason about and probably more efficient than computing
everything on a per-line basis.
2014-05-16 15:31:13 -06:00
Nathan Sobo
cbcc30b384 Don't render empty selections 2014-05-16 15:31:13 -06:00
Nathan Sobo
ce9fe90217 Make multi-line selections appear to span the screen with a single div
Because lines are opaque and any area of a selection that overlaps a
line is actually rendered on the line itself, the screen-spanning
background of a multi-line selection can actually be rendered as a
single div spanning the entire screen from the first row to the
penultimate row of the selection.
2014-05-16 15:31:13 -06:00
Nathan Sobo
7a9278e6a7 Render selection fragments on opaque lines
Because lines are opaque on the GPU for sub pixel antialiasing, the
lines obscure the selections which were formerly rendered behind the
lines. This commit renders selection fragments *on* each opaque line
layer so the selections look correct again. Still needs cleanup and
optimization.
2014-05-16 15:31:13 -06:00
Nathan Sobo
01622140e3 Rename renderedRowRange to visibleRowRange
We only render visible rows now, so this makes more sense.
2014-05-16 15:31:13 -06:00
Nathan Sobo
f3efd7d60b Position cursors relative to scrollLeft and fix specs 2014-05-16 15:31:12 -06:00
Nathan Sobo
63488997ee Give lines and line numbers an opaque background to support sub-pixel AA
Since lines and line numbers are now on the GPU, their text won't be
properly anti-aliased on low-resolution displays unless their layers
have a solid background.
2014-05-16 15:31:12 -06:00
Nathan Sobo
757ae6de39 Position selections relative to viewport
This is getting closer, but lines still need to be opaque. Multi-line
selections will still need to be rendered behind the line layers so they
can extend to the edge of the viewport, so this code still has value.
2014-05-16 15:31:12 -06:00
Nathan Sobo
cfc08e8b98 Allow horizontal scrolling 2014-05-16 15:31:12 -06:00
Nathan Sobo
c8e9282557 Position cursors as layers relative to the viewport 2014-05-16 15:31:11 -06:00