Skip to content

Commit

Permalink
3567778 Make Tk_MeasureChars() honor the TK_AT_LEAST_ONE flag properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgp committed Sep 15, 2012
1 parent ce8ce4c commit 09d4163
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2012-09-15 Don Porter <dgp@users.sourceforge.net>

* macosx/tkMacOSXFont.c: [Bug 3567778] Make Tk_MeasureChars() honor
the TK_AT_LEAST_ONE flag properly.

2012-09-13 Donal K. Fellows <dkf@users.sf.net>

* generic/ttk/ttkEntry.c (EntryDisplay): [Bug 3567453]: Clip regions
Expand Down
4 changes: 3 additions & 1 deletion changes
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---
3 changes: 2 additions & 1 deletion macosx/tkMacOSXFont.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 09d4163

Please sign in to comment.