Commit Graph

7336 Commits

Author SHA1 Message Date
Antonio Scandurra
883bb15276 Don't trigger a blur event when focusing the same editor twice 2016-10-17 16:18:54 +02:00
Antonio Scandurra
4df74beba7 Merge branch 'master' into as-deprecate-shadow-dom 2016-10-17 12:06:00 +02:00
Max Brunsfeld
5db4c8dffb Merge branch 'master' into mb-defer-work-when-opening-files 2016-10-14 12:20:41 -07:00
Max Brunsfeld
c870d1bbe9 Merge branch 'master' into mb-defer-work-when-opening-files 2016-10-12 11:56:27 -07:00
Max Brunsfeld
c2363010f8 Map out-of-range pixel positions to valid columns 2016-10-12 11:50:53 -07:00
Antonio Scandurra
503f31ea6c Delete unnecessary dependencies in TokenizedBuffer specs 2016-10-12 13:11:34 +02:00
Antonio Scandurra
d393cba75d Simplify on-demand placeholder line creation and add test coverage 2016-10-12 13:04:03 +02:00
Antonio Scandurra
e317d7d325 Clean up tests 2016-10-12 12:10:34 +02:00
Antonio Scandurra
d3882c165f 🎨 2016-10-12 12:09:28 +02:00
Antonio Scandurra
00f4c7b282 Use TokenizedBuffer.prototype.tokenizedLineForRow conservatively
Since this method will now construct a placeholder line, we want to use
it only where necessary to keep memory footprint to a minimum.
2016-10-12 09:04:41 +02:00
Antonio Scandurra
66510ae545 Handle null grammars consistently, building placeholder lines on-demand
Previously we were treating the local `NullGrammar` differently from
`atom.grammars.nullGrammar`. These two grammars are conceptually the
same, as the former was created to support editors creation without a
grammar registry.

To keep backwards-compatibility, we also build placeholder lines
on-demand when calling `TokenizedBuffer.prototype.tokenizedLineForRow`.
This ensure that packages relying on the internals of `TokenizedBuffer`
to retrieve syntactic boundaries won't break when the null grammar is
used or large file mode is on.
2016-10-12 09:04:41 +02:00
Max Brunsfeld
d20372a35f Start on removing placeholder lines in TokenizedBuffer 2016-10-12 09:04:41 +02:00
Nathan Sobo
72c5fcad82 Eliminate selector option in tooltip manager API
No packages use it currently, and it's really complex to support so
we should kill it while we have the chance. When it comes time to
rewrite the tooltip code or add features, not worrying about selectors
will make it easier.
2016-10-10 14:08:51 -06:00
Nathan Sobo
e71e1f4ed1 Test custom class option 2016-10-10 14:08:51 -06:00
Nathan Sobo
718cc017e6 Hide click-triggered tooltips when clicking anywhere outside of tooltip
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-10-10 14:08:51 -06:00
Nathan Sobo
253917f007 Make tooltip accept an item option instead of tooltipElement
...and use view registry to resolve it to a view when showing the tooltip.

Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-10-10 14:08:51 -06:00
Antonio Scandurra
cccbde02fe Merge branch 'master' into as-export-text-editor-ctor 2016-10-10 10:39:38 +02:00
Antonio Scandurra
5078d27773 Merge pull request #12925 from atom/as-fix-ci-failure
Return a `Disposable` when stubbing `observePreferredScrollbarStyle`
2016-10-10 10:39:09 +02:00
Antonio Scandurra
3e3f3bb608 Return a Disposable when stubbing observePreferredScrollbarStyle 2016-10-10 10:13:49 +02:00
Antonio Scandurra
3d2e18747f Prefer using new TextEditor to Workspace.prototype.buildTextEditor 2016-10-10 09:28:36 +02:00
Antonio Scandurra
18ddcf902b Statically assign a clipboard instance to the TextEditor class 2016-10-07 18:21:09 +02:00
Antonio Scandurra
d48c1e96d0 Tweak wording in TextEditorElement spec 2016-10-07 15:42:21 +02:00
Antonio Scandurra
901b0b17a3 Fix failing tests 2016-10-07 13:41:00 +02:00
Antonio Scandurra
07d56b23f0 Cache style sheet deprecated selectors transformations in StyleManager 2016-10-07 10:40:41 +02:00
Antonio Scandurra
4db895c731 Transform also more complex atom-text-editor selectors 2016-10-07 10:40:41 +02:00
Antonio Scandurra
1091b0eb60 Fix decorations flashing more than once
When, after flashing a decoration, the decorated range moved, Atom was
showing an additional flash, even if the previous one had already been
consumed. This bug originated in `HighlightsComponent`, where we
maintained state about a certain highlight's flash count. The problem
with this approach, however, is that highlight objects in the component
are very volatile, and we could even have more than one for a single
decoration (i.e. when such decoration spans multiple tiles).

To fix this, we'll now maintain some additional state in
`TextEditorPresenter`, which will set a `needsFlash` attribute on the
highlight state objects, thereby preventing `HighlightsComponent` from
showing the flash animation more than once when the decorated range
changes.
2016-10-07 10:40:41 +02:00
Antonio Scandurra
91df848b8a Keep a backward compatible DOM structure for atom-text-editor contents 2016-10-07 10:40:41 +02:00
Antonio Scandurra
9c5bddaa69 Reimplement block decorations without the shadow DOM 2016-10-07 10:40:41 +02:00
Antonio Scandurra
0f6e018804 Throw an error if there is any deprecation in a spec
Previously this logic lived in atom-reporter, but it seems more
reasonable to throw errors in spec-helper instead, so that the test
suite fails in CI as well whenever a deprecated method or stylesheet is
used.
2016-10-07 10:40:41 +02:00
Antonio Scandurra
80fc448b8d Transform deprecated shadow DOM selectors in StyleManager 2016-10-07 10:40:41 +02:00
Antonio Scandurra
7174b54139 Convert style-manager-spec to JavaScript 2016-10-07 10:40:41 +02:00
Antonio Scandurra
2d553fae12 Return scopes prepended with --syntax from TokenizedBufferIterator 2016-10-07 10:40:41 +02:00
Antonio Scandurra
b71b412ede Transform deprecated shadow DOM selectors 2016-10-07 10:40:41 +02:00
Antonio Scandurra
56a6510b25 Start on removing shadow DOM 2016-10-07 10:40:41 +02:00
Matthew Dapena-Tretter
f1be4f057e Add methods for checking if initial packages have been loaded/activated
This will allow packages to observe the state without having to worry
about subscribing to the events after they've already fired.

Originally suggested in #10839
2016-10-06 15:36:28 -07:00
Max Brunsfeld
e6cac10a23 Always return Disposable from maintain{Config,Grammar} 2016-10-05 12:03:53 -07:00
Indrek Ardel
fd1e060592 Use inline source maps for coffeescript 2016-09-30 15:03:04 +03:00
Max Brunsfeld
d79690e2d5 Merge pull request #12823 from atom/mb-as-guard-tab-length
Guard against null tab length value
2016-09-29 14:21:54 -07:00
Wliu
0e99232615 Merge pull request #12782 from Ingramz/remove-unused-variables-obvious
Remove unused variables (obvious ones)
2016-09-29 16:58:06 -04:00
Max Brunsfeld
51a2360a9b Fix uses of call-window-method IPC channel in specs 2016-09-29 12:13:24 -07:00
Max Brunsfeld
556d79b544 Guard against null tab length value
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-09-29 12:01:39 -07:00
Indrek Ardel
55f3311c01 Remove unused variables 2016-09-26 20:52:13 +03:00
Nathan Sobo
85efc08d13 Merge pull request #12753 from lgeiger/tildify-path
Tildify path in title bar
2016-09-22 15:07:50 -07:00
Nathan Sobo
b7126aff4c Don't serialize packages in deactivatePackages
Serialization still occurs when deactivating a single package via the
API. Otherwise, when the window is closed or reloaded we will serialize
all packages as a result of saving the window state.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-09-22 12:39:06 -06:00
Lukas Geiger
498a56a603 Tildify path in title bar
This will use ~/ for the path to the home directory
2016-09-22 11:14:03 +02:00
Max Brunsfeld
b88fa984cf Wait for project folder to be added in main process tests 2016-09-21 11:37:37 -07:00
Max Brunsfeld
3039024d17 Go back to using promise based on window:loaded event in main process tests 2016-09-21 11:37:24 -07:00
Max Brunsfeld
cff4de5195 Wait for project directory to be added in main process test 2016-09-21 11:04:29 -07:00
Max Brunsfeld
da6bfedc76 Merge branch 'master' into mb-ns-avoid-adding-non-existent-project-directories 2016-09-21 09:54:04 -07:00
Max Brunsfeld
890436a456 Spy on AtomEnvironment.destroy in window event handler spec 2016-09-20 17:45:58 -07:00