handle 0x2028 line separator
diff --git a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
index f8fea72..896f873 100644
--- a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
+++ b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
@@ -488,6 +488,9 @@
tl = tl.previousLine;
if (!tl)
return -1;
+ // need this when 0x2028 line separator in use
+ if (tl.textBlockBeginIndex + tl.rawTextLength == relativePosition)
+ return tl.textBlockBeginIndex + tl.rawTextLength - 1;
return tl.textBlockBeginIndex + tl.rawTextLength;
}
while (--relativePosition)