Skip to content

Commit 3630259

Browse files
committed
fix: Do not try to save non-file models
1 parent 3ea9b0d commit 3630259

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class InitializeTextDocumentFeature implements StaticFeature {
2929

3030
const languageClient = this.languageClient
3131
async function saveFile (textDocument: vscode.TextDocument) {
32-
if (documentSelector != null && vscode.languages.match(documentSelector, textDocument) > 0) {
32+
if (documentSelector != null && vscode.languages.match(documentSelector, textDocument) > 0 && textDocument.uri.scheme === 'file') {
3333
await updateFile(textDocument.uri.toString(), textDocument.getText(), languageClient)
3434

3535
// Always send notification even if the server doesn't support it (because csharp register the didSave feature too late)

0 commit comments

Comments
 (0)