Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextDocument to expose an API for getting a document line number by offset #1519

Closed
vrubezhny opened this issue May 18, 2023 · 0 comments · Fixed by #1520
Closed

TextDocument to expose an API for getting a document line number by offset #1519

vrubezhny opened this issue May 18, 2023 · 0 comments · Fixed by #1520
Milestone

Comments

@vrubezhny
Copy link
Contributor

The TextDocument class provides a getter for obtaining a line delimiter for a line number:

org.eclipse.lemminx.commons.TextDocument.lineDelimiter(int)

... but there is no way to get the number of line by offset.

I'd like the TextDocument class to expose an API method similar to org.eclipse.lemminx.commons.ILineTracker.getLineNumberOfOffset(int) to make it possible to be used by clients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants