Undo on ApplyFormatOperation not working on blank paragraph
Steps to repro:
1. Put your cursor in an empty paragraph
2. Set paragraphStartIndent using an ApplyFormatOperation
3. Undo
You will notice the operation wont get undone.
Here is a little video of it. I used Ctrl+Z to undo. http://screencast.com/t/YzE0ZTc5OTMt
It appears the issue is with this code that gets executed from ParaEdit during the undo
public static function setParagraphStyleChange(flowRoot:TextFlow,begChange:int, endChange:int, coreStyles:Object):void
{
var beginPara:int = begChange;
while (beginPara < endChange)
{
var para:ParagraphElement = flowRoot.findLeaf(beginPara).getParagraph();
para.setCoreStylesInternal(coreStyles);
beginPara = para.getAbsoluteStart() + para.textLength;
}
}
It seems like it should maybe be beginPara <= endChange in the cases of a blank paragraph.
Thanks
