merge undo items if possible
more undo/redo item merging