mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 17:23:51 -05:00
Use existing resource for untitled if it is already open (#11536)
* use existing resource for untitled if it is already open * remove unnecessary call
This commit is contained in:
@@ -43,7 +43,7 @@ export class QueryEditorLanguageAssociation implements ILanguageAssociation {
|
||||
queryEditorInput = this.instantiationService.createInstance(FileQueryEditorInput, '', activeEditor, queryResultsInput);
|
||||
} else if (activeEditor instanceof UntitledTextEditorInput) {
|
||||
const content = (await activeEditor.resolve()).textEditorModel.getValue();
|
||||
queryEditorInput = await this.queryEditorService.newSqlEditor({ open: false, initalContent: content }) as UntitledQueryEditorInput;
|
||||
queryEditorInput = await this.queryEditorService.newSqlEditor({ resource: this.editorService.isOpen(activeEditor) ? activeEditor.resource : undefined, open: false, initalContent: content }) as UntitledQueryEditorInput;
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user