Skip to content

Commit f8f8368

Browse files
committed
Improved UX when executing statements into view
Signed-off-by: worksofliam <[email protected]>
1 parent 0faf711 commit f8f8368

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/views/results/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ export function initialise(context: vscode.ExtensionContext) {
147147
}
148148

149149
async function runHandler(options?: StatementInfo) {
150+
if (options === undefined || options.viewColumn === undefined) {
151+
await resultSetProvider.ensureActivation();
152+
}
153+
150154
// Options here can be a vscode.Uri when called from editor context.
151155
// But that isn't valid here.
152156
const optionsIsValid = (options?.content !== undefined);
@@ -155,7 +159,6 @@ async function runHandler(options?: StatementInfo) {
155159
vscode.commands.executeCommand('vscode-db2i.dove.close');
156160

157161
if (optionsIsValid || (editor && editor.document.languageId === `sql`)) {
158-
await resultSetProvider.ensureActivation();
159162
let chosenView = resultSetProvider;
160163

161164
const useWindow = (title: string, column?: ViewColumn) => {

0 commit comments

Comments
 (0)