Word-wrapping: Fixed overzealous word-wrapping when glyph edge lands exactly on the limit. Because of this, auto-fitting exactly unwrapped text would make it wrap. (fixes initial 1.15 commit, 78645a7d).

This commit is contained in:
omar 2019-06-18 12:50:34 +02:00
parent 516c3dee80
commit dd41df3e98
2 changed files with 3 additions and 1 deletions

View File

@ -43,6 +43,8 @@ Breaking Changes:
Other Changes:
- Window: Fixed InnerClipRect right-most coordinates using wrong padding setting (introduced in 1.71).
- Word-wrapping: Fixed overzealous word-wrapping when glyph edge lands exactly on the limit. Because
of this, auto-fitting exactly unwrapped text would make it wrap. (fixes initial 1.15 commit, 78645a7d).
- ImDrawList: Fixed CloneOutput() helper crashing. (#1860) [@gviot]
- ImDrawListSlitter, ImDrawList::ChannelsSplit(), : Fixed an issue with merging draw commands between
channel 0 and 1. (#2624)

View File

@ -2692,7 +2692,7 @@ const char* ImFont::CalcWordWrapPositionA(float scale, const char* text, const c
}
// We ignore blank width at the end of the line (they can be skipped)
if (line_width + word_width >= wrap_width)
if (line_width + word_width > wrap_width)
{
// Words that cannot possibly fit within an entire line will be cut anywhere.
if (word_width < wrap_width)