Return resulting URI from commands that save the active editor (fix #178713) (#179091)

* Return resulting `URI` from commands that save the active editor (fix #178713)

* 💄

* address feedback

* change to real proposed API

* cleanup
This commit is contained in:
Benjamin Pasero
2023-04-20 18:00:12 +02:00
committed by GitHub
parent 5ea57c3b48
commit 1ed110b6be
15 changed files with 173 additions and 31 deletions

View File

@@ -893,6 +893,14 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return extHostWorkspace.findTextInFiles(query, options || {}, callback, extension.identifier, token);
},
save: (uri) => {
checkProposedApiEnabled(extension, 'saveEditor');
return extHostWorkspace.save(uri);
},
saveAs: (uri) => {
checkProposedApiEnabled(extension, 'saveEditor');
return extHostWorkspace.saveAs(uri);
},
saveAll: (includeUntitled?) => {
return extHostWorkspace.saveAll(includeUntitled);
},