From 2a15f696f2040a339939f9d352d90aedd4b874c9 Mon Sep 17 00:00:00 2001 From: Sanjula Ganepola Date: Fri, 22 Aug 2025 15:08:05 -0400 Subject: [PATCH 1/2] Ignore commented lines when using update prefix Signed-off-by: Sanjula Ganepola --- src/views/results/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/results/index.ts b/src/views/results/index.ts index ec437a15..0addab29 100644 --- a/src/views/results/index.ts +++ b/src/views/results/index.ts @@ -377,8 +377,11 @@ async function runHandler(options?: StatementInfo) { updatableTable = refs[0]; } + const eol = editor.document.eol === vscode.EndOfLine.CRLF ? `\r\n` : `\n`; + const basicSelect = statementDetail.content.split(eol).filter(line => !line.trimStart().startsWith(`--`)).join(eol); + chosenView.setScrolling({ // Never errors - basicSelect: statementDetail.content, + basicSelect: basicSelect, withCancel: inWindow, ref: updatableTable, parameters, From e702978d77f7d0c4d0d8a761272ea02c081b0e5b Mon Sep 17 00:00:00 2001 From: Sanjula Ganepola Date: Fri, 22 Aug 2025 16:43:16 -0400 Subject: [PATCH 2/2] Move EOL Signed-off-by: Sanjula Ganepola --- src/views/results/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/results/index.ts b/src/views/results/index.ts index 0addab29..f2e92c72 100644 --- a/src/views/results/index.ts +++ b/src/views/results/index.ts @@ -264,6 +264,7 @@ async function runHandler(options?: StatementInfo) { vscode.commands.executeCommand('vscode-db2i.dove.close'); if (optionsIsValid || (editor && editor.document.languageId === `sql`)) { + const eol = editor.document.eol === vscode.EndOfLine.CRLF ? `\r\n` : `\n`; let chosenView = resultSetProvider; const useWindow = (title: string, column?: ViewColumn) => { @@ -377,7 +378,6 @@ async function runHandler(options?: StatementInfo) { updatableTable = refs[0]; } - const eol = editor.document.eol === vscode.EndOfLine.CRLF ? `\r\n` : `\n`; const basicSelect = statementDetail.content.split(eol).filter(line => !line.trimStart().startsWith(`--`)).join(eol); chosenView.setScrolling({ // Never errors