summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXFont.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2018-09-30 14:33:12 (GMT)
committerfvogel <fvogelnew1@free.fr>2018-09-30 14:33:12 (GMT)
commit4a512ba7ce51ac113fe88713a0cab5e1fdae2279 (patch)
tree416252670f0dd7e508008c343f3725d4ade267d3 /macosx/tkMacOSXFont.c
parent62d807f1be365d52a6a7f04a30d7ebdec7a8836b (diff)
downloadtk-4a512ba7ce51ac113fe88713a0cab5e1fdae2279.zip
tk-4a512ba7ce51ac113fe88713a0cab5e1fdae2279.tar.gz
tk-4a512ba7ce51ac113fe88713a0cab5e1fdae2279.tar.bz2
Fix [6437e8d00d]: font-24.5 test fails on macOS and Linux. This is the fix for macOS.
Diffstat (limited to 'macosx/tkMacOSXFont.c')
-rw-r--r--macosx/tkMacOSXFont.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index d92e6b4..301659e 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -863,6 +863,10 @@ TkpMeasureCharsInContext(
}
cs = (index <= len && (flags & TK_WHOLE_WORDS)) ?
whitespaceCharacterSet : lineendingCharacterSet;
+ while ((index > start) && (index < len) && (flags & TK_WHOLE_WORDS)
+ && ![cs characterIsMember:[string characterAtIndex:index]]) {
+ index--;
+ }
while (index > start &&
[cs characterIsMember:[string characterAtIndex:(index - 1)]]) {
index--;