Skip to content

Commit

Permalink
re #132143. merge clear and append edits.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Sep 27, 2021
1 parent d0709fb commit 616aea3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,15 @@ export class NotebookTextModel extends Disposable implements INotebookTextModel
&& last.cellIndex === edit.cellIndex
) {
last.edit.outputs = [...last.edit.outputs, ...edit.edit.outputs];
} else if (last.edit.editType === CellEditType.Output
&& !last.edit.append // last cell is not append
&& last.edit.outputs.length === 0 // last cell is clear outputs
&& edit.edit.editType === CellEditType.Output
&& edit.edit.append
&& last.cellIndex === edit.cellIndex
) {
last.edit.append = false;
last.edit.outputs = edit.edit.outputs;
} else {
mergedEdits.push(edit);
}
Expand Down

0 comments on commit 616aea3

Please sign in to comment.