8000 Document TextEditor::bufferRangeForScopeAtBufferPosition by sadick254 · Pull Request #22475 · atom/atom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Document TextEditor::bufferRangeForScopeAtBufferPosition #22475

Merged
merged 4 commits into from 8000
May 24, 2021

Conversation

sadick254
Copy link
Contributor
@sadick254 sadick254 commented May 24, 2021

Description of the Change

It seemed odd for bufferRangeForScopeAtCursor to exist without bufferRangeForScopeAtBufferPosition existing, so that one could (e.g.) handle multiple cursors.
bufferRangeForScopeAtPosition already existed (used by bufferRangeForScopeAtCursor). When I went to add docs I noticed that the other public methods of TextEditor used a particular naming scheme, so I also changed the name to "bufferRangeForScopeAtBufferPosition" to match.

Alternate Designs

N/A

Why Should This Be In Core?

Super handy for figuring out scopes from a package. And has more possible uses than the existing bufferRangeForScopeAtCursor.

Benefits

Ditto.

Possible Drawbacks

If a package were using this undocumented API then it would break.
I could leave "bufferRangeForScopeAtPosition" in as an undocumented alias if that's a concern.

Verification Process

It's really just docs. Let me know what you'd like.

Applicable Issues

N/A

@sadick254 sadick254 merged commit 9a84b67 into master May 24, 2021
@sadick254 sadick254 deleted the bufferRangeForScopeAtPosition-documentation branch May 24, 2021 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0