Skip to content

Commit 2a15f69

Browse files
Ignore commented lines when using update prefix
Signed-off-by: Sanjula Ganepola <[email protected]>
1 parent 7a84ed2 commit 2a15f69

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
@@ -377,8 +377,11 @@ async function runHandler(options?: StatementInfo) {
377377
updatableTable = refs[0];
378378
}
379379

380+
const eol = editor.document.eol === vscode.EndOfLine.CRLF ? `\r\n` : `\n`;
381+
const basicSelect = statementDetail.content.split(eol).filter(line => !line.trimStart().startsWith(`--`)).join(eol);
382+
380383
chosenView.setScrolling({ // Never errors
381-
basicSelect: statementDetail.content,
384+
basicSelect: basicSelect,
382385
withCancel: inWindow,
383386
ref: updatableTable,
384387
parameters,

0 commit comments

Comments
 (0)