This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
Add service to access result marker layer - #614
Merged
Merged
Conversation
added 4 commits
December 7, 2015 16:26
Previously, we were actually leaking marker layers, creating a new one every time we switched to a new editor without destroying the old one. Oops. This creates a permanent association between editors and their results layer so we don’t create extra layers.
This will be delegated to from a service we make available to other packages.
Contributor
|
Looks good to me! |
Contributor
|
👍 It'll be so much simpler to not having to care about the active editor! 👏 |
nathansobo
pushed a commit
that referenced
this pull request
Dec 8, 2015
Add service to access result marker layer
Contributor
Author
|
Keep in mind that the service will return |
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new
[email protected]service that exposes a single methodresultsMarkerLayerForTextEditor. Give it aTextEditor, and it will return a marker layer used to store the search results for that editor. It returns null in versions of Atom prior to 1.3.0.This should make it straightforward to fix packages that relied on finding find-and-replace markers in the default marker layer by simply wrapping introducing a service call to retrieve the appropriate layer for that editor before calling
findMarkers. Everything else should remain the same.I'm planning to hotfix this into beta tomorrow morning so it goes out with the introduction of layers.
Refs atom/atom#9208
/cc @abe33 @lee-dohm