diff --git a/src/sql/parts/notebook/notebookInput.ts b/src/sql/parts/notebook/notebookInput.ts index 200ef01205..e3c09ad8ab 100644 --- a/src/sql/parts/notebook/notebookInput.ts +++ b/src/sql/parts/notebook/notebookInput.ts @@ -101,7 +101,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