Skip to content

Commit a3e7e13

Browse files
Merge pull request #446 from codefori/fix/eol-bug
Fix view contents button when no active editor
2 parents 0f9414b + 33644dd commit a3e7e13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/views/results/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ 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`;
269268
let chosenView = resultSetProvider;
270269

271270
const useWindow = (title: string, column?: ViewColumn) => {
@@ -380,6 +379,7 @@ async function runHandler(options?: StatementInfo) {
380379
}
381380

382381
const uiId = registerRunStatement(statementDetail);
382+
const eol = editor.document.eol === vscode.EndOfLine.CRLF ? `\r\n` : `\n`;
383383
const basicSelect = statementDetail.content.split(eol).filter(line => !line.trimStart().startsWith(`--`)).join(eol);
384384

385385
chosenView.setScrolling({ // Never errors

0 commit comments

Comments
 (0)