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

Support mapping document positions after the end of the file #8673

Closed
davidwengier opened this issue May 5, 2023 · 1 comment
Closed

Support mapping document positions after the end of the file #8673

davidwengier opened this issue May 5, 2023 · 1 comment
Milestone

Comments

@davidwengier
Copy link
Contributor

See #8669 (comment) and dotnet/roslyn#68081 for more context.

Essentially it is per LSP spec to send a document position for { Line: 10, Column: 0 } in a file that has only 9 lines, if there is no newline at the end. We are currently working around this in our OmniSharp extension for formatting (the bug the above PR is fixing) but what that is essentially doing is putting some work in TypeScript, in a specific endpoint, to avoid our C# code crashing. We should just make the C# code more tolerant. Also the LSP spec specifically calls out this behaviour as being allowed.

@ghost ghost added the untriaged label May 5, 2023
@phil-allen-msft phil-allen-msft added this to the 17.7 Planning milestone May 18, 2023
@ghost ghost removed the untriaged label May 18, 2023
@davidwengier
Copy link
Contributor Author

Did this in #9149.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants