未验证 提交 aced01dd 编写于 作者: P Peng Lyu 提交者: GitHub

Merge pull request #99640 from DonJayamanne/fixCellJoin

Use eol when joining cells
......@@ -992,8 +992,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
if (!above.hasModel()) {
return null;
}
const insertContent = cell.getText();
const insertContent = (cell.textModel?.getEOL() ?? '') + cell.getText();
const aboveCellLineCount = above.textModel.getLineCount();
const aboveCellLastLineEndColumn = above.textModel.getLineLength(aboveCellLineCount);
above.textModel.applyEdits([
......@@ -1017,7 +1016,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
return null;
}
const insertContent = below.getText();
const insertContent = (cell.textModel?.getEOL() ?? '') + below.getText();
const cellLineCount = cell.textModel.getLineCount();
const cellLastLineEndColumn = cell.textModel.getLineLength(cellLineCount);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册