Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #96 from ckeditor/t/ckeditor5/1385
Browse files Browse the repository at this point in the history
Internal: Used `forceWeakRemove` flag in undo OT. See ckeditor/ckeditor5-engine#1678.
  • Loading branch information
Reinmar committed Feb 18, 2019
2 parents 601f213 + 46a7804 commit fc2166a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/basecommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ export default class BaseCommand extends Command {
{
useRelations: true,
document: this.editor.model.document,
padWithNoOps: false
padWithNoOps: false,
forceWeakRemove: true
}
);

Expand Down
7 changes: 0 additions & 7 deletions tests/undocommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,6 @@ describe( 'UndoCommand', () => {
for ( const item of model.createRangeIn( doc.graveyard ).getItems() ) {
expect( item.hasAttribute( 'key' ) ).to.be.false;
}

// Let's undo wrapping. This will remove the P element and leave us with empty root.
undo.execute( batch3 );
expect( root.maxOffset ).to.equal( 0 );

expect( editor.model.document.selection.getFirstRange().isEqual( r( 0, 0 ) ) ).to.be.true;
expect( editor.model.document.selection.isBackward ).to.be.false;
} );

it( 'should omit deltas with non-document operations', () => {
Expand Down

0 comments on commit fc2166a

Please sign in to comment.