Skip to content

Commit dc996c6

Browse files
authored
fix: document version reset on textDocument/didSave (#2695)
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).
2 parents 745725e + ae04331 commit dc996c6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpTextDocumentSyncHandler.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,6 @@ await _bufferHandler.Handle(new UpdateBufferRequest()
154154
FileName = Helpers.FromUri(notification.TextDocument.Uri),
155155
Buffer = notification.Text
156156
});
157-
158-
_documentVersions.Reset(notification.TextDocument);
159157
}
160158
return Unit.Value;
161159
}

0 commit comments

Comments
 (0)