Description
I discovered an error concerning undo in a scenario with paste and delete.
This test doesn't pass:
john.setData( '<paragraph>Ab[]cd</paragraph><paragraph>Wxyz</paragraph>' );
john.editor.model.insertContent(
new DocumentFragment( [
new Element( 'paragraph', null, new Text( 'Foo' ) ),
new Element( 'paragraph', null, new Text( 'Bar' ) )
] )
);
john.setSelection( [ 1, 3 ], [ 2, 2 ] );
john._processExecute( 'delete' );
expectClients( '<paragraph>AbFoo</paragraph><paragraph>Baryz</paragraph>' );
john.undo();
expectClients( '<paragraph>AbFoo</paragraph><paragraph>Barcd</paragraph><paragraph>Wxyz</paragraph>' );
john.undo();
expectClients( '<paragraph>Abcd</paragraph><paragraph>Wxyz</paragraph>' );
There are two problems, with split x split transformation and merge x split transformation. These are some edge cases that weren't yet covered in OT.