From b41e7be57014d7d8f36d1f7acd6ad7a125320463 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 15 Sep 2012 13:34:07 +0000 Subject: 3567778 Make Tk_MeasureChars() honor the TK_AT_LEAST_ONE flag properly. --- ChangeLog | 5 +++++ changes | 4 +++- macosx/tkMacOSXFont.c | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2766b4..d15099c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-15 Don Porter + + * macosx/tkMacOSXFont.c: [Bug 3567778] Make Tk_MeasureChars() honor + the TK_AT_LEAST_ONE flag properly. + 2012-09-13 Donal K. Fellows * generic/ttk/ttkEntry.c (EntryDisplay): [Bug 3567453]: Clip regions diff --git a/changes b/changes index 2bda50d..cc726ea 100644 --- a/changes +++ b/changes @@ -7006,6 +7006,8 @@ and -to (porter) 2012-08-25 (bug fix)[3554026,3561016] crash with tearoff menus (gavilan) +2012-09-15 (bug fix)[3567778] stop hang in wrapped label (porter) + Many revisions to better support a Cygwin environment (nijtmans) ---- Released 8.6b3, September 7, 2012 --- See ChangeLog for details --- +--- Released 8.6b3, September 18, 2012 --- See ChangeLog for details --- diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index e4e4e03..d800ae5 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -883,7 +883,8 @@ TkpMeasureCharsInContext( /* The call to CTTypesetterSuggestClusterBreak above will always return at least one character regardless of whether it exceeded it or not. Clean that up now. */ - while (width > maxWidth && !(flags & TK_PARTIAL_OK) && index > start) { + while (width > maxWidth && !(flags & TK_PARTIAL_OK) + && index > start+(flags & TK_AT_LEAST_ONE)) { range.length = --index; line = CTTypesetterCreateLine(typesetter, range); width = CTLineGetTypographicBounds(line, NULL, NULL, NULL); -- cgit v0.12