Commit Graph

15569 Commits

Author SHA1 Message Date
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
9001d34ddf Change selection specs to match new rendering scheme 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
e44027b186 Fix the height/width of the editor in spec
Now that everything is absolutely position, the editor no longer assumes
a "natural" height and width. This can be addressed later if we want to
allow editors to expand based on their content.
2014-05-16 15:31:13 -06:00
Nathan Sobo
d53f97ecfe Fix horizontal scrolling spec 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
8d25da9474 Update line number rendering specs for new layer scheme 2014-05-16 15:31:12 -06:00
Nathan Sobo
1aee276b45 Update line rendering specs for new layer scheme 2014-05-16 15:31:12 -06:00
Nathan Sobo
191bc115cf Use explicit descendant selector for styling lines 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
a22480d857 Don't give lines a negative z-index
Removing the z-index makes them accessible via mouse in the inspector.
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
Nathan Sobo
a36163ce86 Manually set the gutter width to the width of a line number
We need to absolutely position line numbers to minimize repaints, but
the gutter needs to be wide enough to show them.
2014-05-16 15:31:11 -06:00
Nathan Sobo
e3d1a6aef8 Render each line number on its own layer 2014-05-16 15:31:11 -06:00
Nathan Sobo
7d8256d343 Drop lineOverdraw and scroll-view-content div 2014-05-16 15:31:11 -06:00
Nathan Sobo
bf9f8597a7 Give each line its own layer on the GPU 2014-05-16 15:31:11 -06:00
Nathan Sobo
9f2c8c1756 Measure characters in new lines when vertically scrolling stops 2014-05-16 15:31:11 -06:00
Nathan Sobo
0ae8765a8a Update scroll position directly on mousewheel events
Previously, we were updating the scrollbars and relying on an async
scroll events to fire. But updating the scrollbars is expensive, so this
updates the model directly when the next animation frame fires instead.
2014-05-16 15:31:11 -06:00
Nathan Sobo
308960309d Overdraw lines to discourage Blink from repainting the entire editor 2014-05-16 15:31:11 -06:00
Nathan Sobo
b8ac8516fe Don't preserve rows when scrolling 2014-05-16 15:31:11 -06:00
Nathan Sobo
3f1ce617a7 Try to fix flaky spec 2014-05-16 15:05:49 -06:00
Kevin Sawicki
10e609ba27 Upgrade to tabs@0.40.0 2014-05-16 13:31:58 -07:00
Kevin Sawicki
6cae6981d8 Recommend cloning to shallow path
Prevents path length issues
2014-05-16 13:29:39 -07:00
Kevin Sawicki
bff396ab1a Upgrade to language-xml@0.13.0 2014-05-16 13:00:46 -07:00
Kevin Sawicki
7f442d045b Check for errors in script/mkdeb
Refs #2129
2014-05-16 12:54:24 -07:00
Kevin Sawicki
628ea72943 Check if selector matches parents of test element
Previously a menu for a keybinding with a .workspace selector would not
display the shortcut because the selector wasn't matching the test editor
element directly.

Now the parent elements of the test editor are checked as well.

Closes #2089
2014-05-16 11:57:04 -07:00
Kevin Sawicki
fc2830bacb Use div for test workspace element 2014-05-16 11:53:40 -07:00
Kevin Sawicki
b5bff9f8b8 Upgrade to language-python@0.16.0 2014-05-16 10:38:48 -07:00
Kevin Sawicki
5e2181e665 🐧 Add keybindings for select-to-top/bottom
ctrl-shift-home/end are now mapped

Closes #2251
2014-05-16 10:05:33 -07:00
Kevin Sawicki
b0e91f8b33 Upgrade to tree-view@0.93.0 2014-05-16 09:47:44 -07:00
Kevin Sawicki
635af7f838 Upgrade to apm 0.54.0 2014-05-16 09:27:16 -07:00
Kevin Sawicki
e537080b64 Upgrade to autocomplete@0.28.0 2014-05-16 08:36:02 -07:00
Nathan Sobo
f2c7d171bf Fix another subscription leakage associated with theme manager specs 2014-05-16 09:14:21 -06:00
Nathan Sobo
7a4a85cb20 Fix failures running config specs locally 2014-05-16 09:00:01 -06:00
Nathan Sobo
2952f4c2ad Merge pull request #2213 from dyross/dyr-hide-cursor-nicely
Hide the cursor with cursor-hidden class rather than element.style
2014-05-16 08:36:27 -06:00
Nathan Sobo
ce668e7139 Fix subscription leak when ~/.atom/styles.less is present running specs 2014-05-16 08:33:49 -06:00
David Y. Ross
e3302b3f73 hide the cursor with cursor-hidden class rather than element.style 2014-05-15 19:20:32 -07:00
Kevin Sawicki
e3dbd412e1 Upgrade to find-and-replace@0.105.0 2014-05-15 15:34:50 -07:00
Kevin Sawicki
fc9a11959c Upgrade to language-html@0.22.0 2014-05-15 15:33:37 -07:00
Kevin Sawicki
71155abf57 Upgrade to find-and-replace@0.104.0 2014-05-15 15:19:54 -07:00
Kevin Sawicki
d5458c1865 Upgrade to fuzzy-finder@0.51.0 2014-05-15 15:14:51 -07:00
Kevin Sawicki
56af2ca4d7 Upgrade to bracket-matcher@0.34.0 2014-05-15 15:10:01 -07:00
Kevin Sawicki
cc1e6e2a1f Upgrade to find-and-replace@0.103.0 2014-05-15 14:48:24 -07:00
Kevin Sawicki
d7c98cb394 Upgrade to language-sass@0.11.0 2014-05-15 14:44:36 -07:00
Kevin Sawicki
4ff5f96fd4 Upgrade to go-to-line@0.20.0 2014-05-15 14:41:33 -07:00