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