mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
VSCode refactored their terminal to have more delayed initialization, but still return as complete before the actual instance is ready for focus and paste events. The fix is to add a delay so this can complete before calling the paste action. As this doesn't affect extensions (the hop to the extension host causes a delay) I'm not raising this with VSCode as an upstream issue, just fixing on our side
This commit is contained in:
@@ -346,7 +346,10 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
|||||||
this._connectionDialog.close();
|
this._connectionDialog.close();
|
||||||
this._clipboardService.writeText('kinit\r');
|
this._clipboardService.writeText('kinit\r');
|
||||||
this._commandService.executeCommand('workbench.action.terminal.focus').then(resolve => {
|
this._commandService.executeCommand('workbench.action.terminal.focus').then(resolve => {
|
||||||
return this._commandService.executeCommand('workbench.action.terminal.paste');
|
// setTimeout to allow for terminal Instance to load.
|
||||||
|
setTimeout(() => {
|
||||||
|
return this._commandService.executeCommand('workbench.action.terminal.paste');
|
||||||
|
}, 10);
|
||||||
}).then(resolve => null, reject => null);
|
}).then(resolve => null, reject => null);
|
||||||
return null;
|
return null;
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user