Skip to content

Commit ca152ab

Browse files
authored
Merge pull request #275 from codefori/fix/no_history_for_non_open
Stop appending to history for statements run just for results
2 parents 021fa35 + 1c2e945 commit ca152ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/views/results/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,11 @@ async function runHandler(options?: StatementInfo) {
314314
}
315315
}
316316

317+
// If we the API is called with no open, then don't add it to history
318+
if (statementDetail.open === false) {
319+
statementDetail.history = false;
320+
}
321+
317322
if ((statementDetail.qualifier === `statement` || statementDetail.qualifier === `explain`) && statementDetail.history !== false) {
318323
vscode.commands.executeCommand(`vscode-db2i.queryHistory.prepend`, statementDetail.content);
319324
}

0 commit comments

Comments
 (0)