Skip to content

Commit

Permalink
Don't sync the document if there have been no changes (such as on fil…
Browse files Browse the repository at this point in the history
…e open).
  • Loading branch information
333fred committed Apr 6, 2021
1 parent 07225f1 commit 696b97d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/changeForwarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function forwardDocumentChanges(server: OmniSharpServer): IDisposable {

return workspace.onDidChangeTextDocument(event => {

let { document } = event;
if (document.isUntitled || document.languageId !== 'csharp' || document.uri.scheme !== 'file') {
let { document, contentChanges } = event;
if (document.isUntitled || document.languageId !== 'csharp' || document.uri.scheme !== 'file' || contentChanges.length === 0) {
return;
}

Expand Down

0 comments on commit 696b97d

Please sign in to comment.