Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

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.

3 participants