flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-tlf] [refs/heads/develop] - handle 0x2028 line separator
Date Fri, 11 Oct 2013 06:23:45 GMT
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 <aharui@apache.org>
Authored: Thu Oct 10 23:22:57 2013 -0700
Committer: Alex Harui <aharui@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)


Mime
View raw message