Skip to content

Commit 7870fbd

Browse files
committed
fix: Only save managed documents
1 parent 8bbe5b8 commit 7870fbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/extensions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ export class FileSystemFeature implements StaticFeature {
131131
}))
132132
disposableCollection.push(getServices().workspace.registerSaveDocumentHandler({
133133
async saveTextContent (textDocument, reason) {
134-
await infrastructure.saveFileContent?.(textDocument, reason, languageClientManager)
134+
if (languageClientManager.isModelManaged(textDocument)) {
135+
await infrastructure.saveFileContent?.(textDocument, reason, languageClientManager)
136+
}
135137
}
136138
}))
137139
return disposableCollection

0 commit comments

Comments
 (0)