You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2013/10/11 08:23:45 UTC
git commit: [flex-tlf] [refs/heads/develop] - handle 0x2028 line
separator
Updated Branches:
refs/heads/develop 3b7adac46 -> 53a58595e
handle 0x2028 line separator
Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/53a58595
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/53a58595
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/53a58595
Branch: refs/heads/develop
Commit: 53a58595e4859226e20798b6a337540c6bce0d7e
Parents: 3b7adac
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 10 23:22:57 2013 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 10 23:23:38 2013 -0700
----------------------------------------------------------------------
textLayout/src/flashx/textLayout/elements/ParagraphElement.as | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/53a58595/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
----------------------------------------------------------------------
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 @@ package flashx.textLayout.elements
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)