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

Avoid returning TextEdit on empty diff #3435

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

stefanvanburen
Copy link
Member

In the case that the formatted text is the same as the existing text in the document, we shouldn't return a TextEdit. (This manifests in needing multiple undo operations in an editor to get back to a change, because the TextEdit is registered as a change to the document despite not changing the text.)

Copy link
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 30, 2024, 1:53 PM

@stefanvanburen
Copy link
Member Author

Relevant protocol docs (I think we're on 3.16 from the protocol package).

image

Copy link
Member

@doriable doriable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

@stefanvanburen stefanvanburen merged commit da80689 into main Oct 30, 2024
12 checks passed
@stefanvanburen stefanvanburen deleted the svanburen/lsp-avoid-empty-change branch October 30, 2024 21:04
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 this pull request may close these issues.

2 participants