Skip to content

Commit 36a5ce2

Browse files
Andrew Hallgithub-actions
authored andcommitted
Ignore updates with no changes for csharp files
1 parent cc28f41 commit 36a5ce2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/razor/src/document/razorDocumentManager.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,16 @@ export class RazorDocumentManager implements IRazorDocumentManager {
237237
);
238238
}
239239

240+
if (updateBufferRequest.changes.length === 0 && !updateBufferRequest.previousWasEmpty) {
241+
if (this.logger.verboseEnabled) {
242+
this.logger.logVerbose(
243+
`Update for '${updateBufferRequest.hostDocumentFilePath}' was empty. This shouldn't happen because it means the language server is doing extra work.`
244+
);
245+
}
246+
247+
return;
248+
}
249+
240250
const hostDocumentUri = vscode.Uri.file(updateBufferRequest.hostDocumentFilePath);
241251
const document = this._getDocument(hostDocumentUri);
242252
const projectedDocument = document.csharpDocument;

0 commit comments

Comments
 (0)