]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.text.core-text: apply @kusumotonorio patch.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 12 Mar 2020 03:58:27 +0000 (20:58 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 12 Mar 2020 03:59:20 +0000 (20:59 -0700)
basis/ui/text/core-text/core-text.factor

index 38af6d8a9bbea5433eefc3657d3efe6338facf85..4225884aef23f936598060f665ce40e6dc4a3b18 100644 (file)
@@ -49,9 +49,9 @@ M:: core-text-renderer x>offset ( x font string -- n )
     [ 2drop 0 ] [
         cached-line line>>
         swap scale 0 <CGPoint> CTLineGetStringIndexForPosition
-    ] if-empty
-    2 * 0 swap string utf16n encode subseq
-    utf16n decode length ;
+        2 * 0 swap string utf16n encode subseq
+        utf16n decode length
+    ] if-empty ;
 
 M:: core-text-renderer offset>x ( n font string -- x )
     font string cached-line line>>