add config for open after save behavior (#15675)

This commit is contained in:
Alan Ren
2021-06-10 13:32:05 -07:00
committed by GitHub
parent 922d1287ac
commit eea8c61b6e
3 changed files with 10 additions and 3 deletions

View File

@@ -314,7 +314,8 @@ export class ResultSerializer {
* Open the saved file in a new vscode editor pane
*/
private openSavedFile(filePath: URI, format: string): void {
if (format !== SaveFormat.EXCEL) {
const openAfterSaveConfig = this._configurationService.getValue<IQueryEditorConfiguration>('queryEditor').results.openAfterSave;
if (format !== SaveFormat.EXCEL && openAfterSaveConfig) {
this._editorService.openEditor({ resource: filePath }).then((result) => {
}, (error: any) => {
@@ -330,7 +331,7 @@ export class ResultSerializer {
[{
label: nls.localize('openFile', "Open file"),
run: () => {
this.openerService.open(filePath, { openExternal: true });
this.openerService.open(filePath, { openExternal: format === SaveFormat.EXCEL });
}
}]
);