Kevin Sawicki
6336ffbf44
Store included grammar scopes
2014-06-23 16:22:37 -07:00
Kevin Sawicki
6aeca79d1b
Return empty promise when already loaded
2014-06-23 16:13:13 -07:00
Kevin Sawicki
e76b24f8ad
Catch error
2014-06-23 16:04:25 -07:00
Kevin Sawicki
0304f187dd
Remove preload request from deserializeParams
2014-06-23 16:03:56 -07:00
Kevin Sawicki
968ab0e41d
Remove unused methods
2014-06-23 16:02:45 -07:00
Kevin Sawicki
ea6feddd7b
Track duration of grammar preload
2014-06-23 16:00:58 -07:00
Kevin Sawicki
bb5d628397
Track packages to preload in Atom class
2014-06-23 15:59:26 -07:00
Kevin Sawicki
f3d87b1653
Set packageName property on Grammar objects
2014-06-23 15:58:06 -07:00
Ben Ogle
0dadce1047
Serialize all included grammar scopes
2014-06-20 17:04:21 -07:00
Ben Ogle
8c3bfaa3a2
Return when grammars are already loaded
2014-06-20 17:04:21 -07:00
Ben Ogle
f8b8b22b75
Preload grammars on deserialization
2014-06-20 17:04:21 -07: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