Skip to content

Commit f2e9297

Browse files
committed
Merge branch 'main' into feature/output_parameters
Signed-off-by: worksofliam <[email protected]>
2 parents 42864fa + e37e84e commit f2e9297

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/views/results/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ async function runHandler(options?: StatementInfo) {
265265
vscode.commands.executeCommand('vscode-db2i.dove.close');
266266

267267
if (optionsIsValid || (editor && editor.document.languageId === `sql`)) {
268+
const eol = editor.document.eol === vscode.EndOfLine.CRLF ? `\r\n` : `\n`;
268269
let chosenView = resultSetProvider;
269270

270271
const useWindow = (title: string, column?: ViewColumn) => {
@@ -379,9 +380,10 @@ async function runHandler(options?: StatementInfo) {
379380
}
380381

381382
const uiId = registerRunStatement(statementDetail);
383+
const basicSelect = statementDetail.content.split(eol).filter(line => !line.trimStart().startsWith(`--`)).join(eol);
382384

383385
chosenView.setScrolling({ // Never errors
384-
basicSelect: statementDetail.content,
386+
basicSelect: basicSelect,
385387
withCancel: inWindow,
386388
ref: updatableTable,
387389
parameters,

0 commit comments

Comments
 (0)