Skip to content

fix: document version reset on textDocument/didSave#2695

Merged
JoeRobich merged 2 commits into
OmniSharp:masterfrom
S222em:fix-document-version-reset
Nov 13, 2025
Merged

fix: document version reset on textDocument/didSave#2695
JoeRobich merged 2 commits into
OmniSharp:masterfrom
S222em:fix-document-version-reset

Conversation

@S222em

@S222em S222em commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Fixes #2375

This PR fixes an issue where the document version is reset to 0 on textDocument/didSave.

It is not documented in the LSP that the version should reset, see: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_didSave.

This caused a document version mismatch in editors when applying code actions (for example see zed-industries/zed#31014).

@JoeRobich JoeRobich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@S222em Thanks!

@JoeRobich JoeRobich merged commit dc996c6 into OmniSharp:master Nov 13, 2025
18 of 19 checks passed
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.

DocumentVersion shouldn't be reset to 0 when handling "textDocument/didSave"

2 participants