From da12eb698ddbb05c02a7b6e056a42412aff33bae Mon Sep 17 00:00:00 2001 From: Thorsten Muerell Date: Fri, 10 Nov 2017 21:50:26 +0100 Subject: [PATCH] Small fixes --- src/editorsupport.ts | 2 +- src/resultsetview.ts | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/editorsupport.ts b/src/editorsupport.ts index 09d768f..a4a4e94 100644 --- a/src/editorsupport.ts +++ b/src/editorsupport.ts @@ -29,7 +29,7 @@ export class BlockDetector { } } else { while (!endLine.text.match(/;/) && endLine.lineNumber < doc.lineCount-1) { - endLine = this.editor.document.lineAt(startLine.lineNumber+1) + endLine = this.editor.document.lineAt(endLine.lineNumber+1) } } diff --git a/src/resultsetview.ts b/src/resultsetview.ts index a45b038..6344194 100644 --- a/src/resultsetview.ts +++ b/src/resultsetview.ts @@ -6,6 +6,7 @@ export class TextDocumentContentProvider implements vscode.TextDocumentContentPr public provideTextDocumentContent(uri: vscode.Uri): string { if (!this._data) return this.errorSnippet(); + if (this._data['rows'].length == 0) return this.errorSnippet(); let styles = `