mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-28 09:35:38 -05:00
Query editor input titles (#9512)
* address untitled editor file name differences; remove feature for updating title for untitled to content * add tests for new methods * fix tests * fix up tests * remove unncessary await * revert changes to title for content
This commit is contained in:
@@ -41,7 +41,7 @@ export async function setMode(accessor: ServicesAccessor, modeSupport: IModeSupp
|
||||
if (newInputCreator) { // if we know how to handle the new language, tranform the input and replace the editor (e.x notebook, sql, etc)
|
||||
const newInput = newInputCreator.convertInput(input || activeEditor);
|
||||
if (newInput) { // the factory will return undefined if it doesn't know how to handle the input
|
||||
await editorService.replaceEditors([{ editor: activeEditor, replacement: newInput }], activeControl.group);
|
||||
await editorService.replaceEditors([{ editor: activeEditor, replacement: await newInput }], activeControl.group);
|
||||
}
|
||||
} else if (oldInputCreator) { // if we don't know handle to handle the new language but we know how to handle the current language, replace the editor with the reverted input (e.x sql -> text)
|
||||
await editorService.replaceEditors([{ editor: activeEditor, replacement: input }], activeControl.group);
|
||||
|
||||
Reference in New Issue
Block a user