mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 01:25:37 -05:00
Hide suggest widget on cell execution (#16895)
* Hide suggest widget on cell execution * Also hide for query editor * Fix compile issue with tests
This commit is contained in:
@@ -197,7 +197,8 @@ export class RunQueryAction extends QueryTaskbarAction {
|
||||
constructor(
|
||||
editor: QueryEditor,
|
||||
@IQueryModelService protected readonly queryModelService: IQueryModelService,
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@ICommandService private readonly commandService?: ICommandService
|
||||
) {
|
||||
super(connectionManagementService, editor, RunQueryAction.ID, RunQueryAction.EnabledClass);
|
||||
this.label = nls.localize('runQueryLabel', "Run");
|
||||
@@ -237,6 +238,8 @@ export class RunQueryAction extends QueryTaskbarAction {
|
||||
}
|
||||
|
||||
if (this.isConnected(editor)) {
|
||||
// Hide IntelliSense suggestions list when running query to match SSMS behavior
|
||||
this.commandService?.executeCommand('hideSuggestWidget');
|
||||
// if the selection isn't empty then execute the selection
|
||||
// otherwise, either run the statement or the script depending on parameter
|
||||
let selection = editor.getSelection(false);
|
||||
|
||||
Reference in New Issue
Block a user