From 6873353cd472e8c193513addf1f56076b9bc6d63 Mon Sep 17 00:00:00 2001 From: Raj <44002319+rajmusuku@users.noreply.github.com> Date: Wed, 20 Mar 2019 11:12:02 -0700 Subject: [PATCH] #4618: Notebook JSON has extra } after save (#4627) --- src/sql/parts/notebook/notebookInput.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/parts/notebook/notebookInput.ts b/src/sql/parts/notebook/notebookInput.ts index 3ba8a2faef..1760273704 100644 --- a/src/sql/parts/notebook/notebookInput.ts +++ b/src/sql/parts/notebook/notebookInput.ts @@ -100,7 +100,8 @@ export class NotebookEditorModel extends EditorModel { let content = JSON.stringify(notebookModel.toJSON(), undefined, ' '); let model = this.textEditorModel.textEditorModel; let endLine = model.getLineCount(); - let endCol = model.getLineLength(endLine); + let endCol = model.getLineMaxColumn(endLine); + this.textEditorModel.textEditorModel.applyEdits([{ range: new Range(1, 1, endLine, endCol), text: content