Nathan Sobo
b9a3eca091
Correcly handle folds that end where other folds begin
...
Fixes #2247
2014-06-23 11:29:14 -06:00
Nathan Sobo
3fd4e57162
Render a dummy highlight decoration to prevent artifacts
...
When the last highlight gets removed, we get a rendering artifact.
Always rendering an empty dummy at 0,0 ensures that never happens.
2014-06-21 02:23:59 -06: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
e49414d2ec
Merge pull request #2699 from atom/ns-react-fix-artifacts
...
Render highlights on their own layer to avoid GPU artifacts
2014-06-20 17:03:26 -06:00
Nathan Sobo
e084bebb54
Autoscroll to selections in model layer when added
...
Fixes #2698
2014-06-20 16:53:46 -06:00
Nathan Sobo
df8d014e3c
Add a dedicated underlayer to avoid GPU artifacts on wrap guide etc
...
Trying to make the .highlights layer double as the .underlayer was
causing GPU artifacts on the wrap guide when the last highlight was
removed. This puts it in its own layer to avoid that.
2014-06-20 16:33:08 -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
4218e0a037
Render highlights on their own layer to avoid GPU artifacts
...
Previously, when the last highlight div was removed from the lines
layer, chunks of the lines would sometimes disappear. Since we've
discovered that giving the lines an opaque background doesn't help with
subpixel anti-aliasing anyway, I've found that rendering highlights on
their own layer behind the lines and making the lines layer transparent
avoids the arficacts.
2014-06-20 15:18:19 -06:00
Nathan Sobo
ef2bdf6365
Only forceUpdate of EditorComponent on nextTick if it's mounted
2014-06-20 15:06:16 -06:00
Nathan Sobo
ef1ec9b693
Emit events *after* update to prevent requesting update during an update
...
When updating synchronously in specs, we can't get away with requesting
an update before the previous update is completed. If we emit events
before the update, we have the potential for one of those events to
cause this to happen. Moving them to after is more correct anyway.
2014-06-20 15:06:16 -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
Kevin Sawicki
3faecb5988
📝 Correct broken references
2014-06-20 13:57:50 -07:00
Kevin Sawicki
148180adda
Implement select page up/down in Editor
2014-06-20 13:09:27 -07:00
Justin Bradford
01a4032895
Add text selection using page up/down keys to the React-based editor
2014-06-20 13:09:16 -07:00
Justin Bradford
2b2b65ec82
Add command to select text using page up/down keys
2014-06-20 13:08:48 -07:00
Ben Ogle
dee0771dd7
Use ? in the conditional.
2014-06-20 12:50:42 -07:00
Ben Ogle
aef6991ca8
Set the decorations and previousDecorations vars before loops
...
Both loops use both vars, so both need to be available before the
diffing!
2014-06-20 11:29:18 -07:00
Ben Ogle
e8db3e97ce
Remove cached decorations for removed lines
2014-06-20 11:28:01 -07:00
Ben Ogle
b1dd4f2e8e
Index the previous decoration cache by lineNumberId rather than screenRow
...
Why? Screen rows change. If some operation (folding?) changes the
screen rows and the decorations at the same time, the previous
decorations will no longer be valid and can no longer be diffed against
the decorations to-be-rendered.
2014-06-20 11:27:39 -07:00
Ben Ogle
1228435f9b
💄
2014-06-20 11:00:40 -07:00
Ben Ogle
593b5b4e36
Use _.deepContains
2014-06-20 10:50:12 -07: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
184068dc55
Add handlers for IME composition
2014-06-19 15:03:34 -07:00
Ben Ogle
f27b897e91
Change message in scroll canary
2014-06-19 14:27:20 -07:00
Ben Ogle
6e201104bc
Only fix the scroll position when the editor is mounted
...
fixes #2664
2014-06-19 14:24:47 -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
2eb5ef0816
Merge pull request #2665 from atom/bo-gutter-selection
...
Implement gutter clicking and dragging to change selection on react editor
2014-06-19 13:48:40 -07:00
Nathan Sobo
bee7be1d1a
Fix errors refreshing directly after adding selection below/above
2014-06-19 13:43:10 -06: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
77717d3eff
Fix spec
2014-06-19 12:05:17 -07:00
Ben Ogle & Nathan Sobo
d3e0005b33
💄 Break out separate methods for gutter click and shift-click
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
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
17f9cc49f2
Honor the center: true option in scrollTo* methods
...
Fixes #2648
2014-06-18 21:48:14 -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
Kevin Sawicki
de132d79a4
Add parens for clarity
2014-06-18 17:16:50 -07:00
Kevin Sawicki
5af181ffb5
Default column to 0
2014-06-18 17:11:34 -07:00
Kevin Sawicki
a497b0f90f
💄 Use trailing for loop
2014-06-18 16:42:36 -07:00
Kevin Sawicki
e4fd80399d
Add token value directly to column
2014-06-18 16:41:10 -07:00
Kevin Sawicki
ec8805e99e
Merge branch 'master' of https://github.com/a-m-s/atom into ks-align-hard-tabs
...
Conflicts:
src/tokenized-line.coffee
2014-06-18 16:09:07 -07:00
Ben Ogle
2a28eafd04
Merge pull request #2661 from atom/bo-fold-markers
...
Add fold markers to folded lines
2014-06-18 14:58:32 -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
probablycorey
468c6598db
Make sure the overlayer class is only used once.
...
Using it twice causes context menus with the .overlay selector to
appear twice.
Closes #2601
2014-06-18 13:24:15 -07:00
Nathan Sobo
f1f83a7d36
Add a comment explaining the .editor-colors class on .lines
2014-06-18 12:36:40 -06:00