1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Text, DrawList: Improved handling of long single-line wrapped text. (#7496, #5720)

This commit is contained in:
ocornut 2024-04-15 12:52:45 +02:00
parent fab96a6e59
commit daecfffefb
2 changed files with 4 additions and 0 deletions

View file

@ -4080,6 +4080,8 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, Im
{
x = start_x;
y += line_height;
if (y > clip_rect.w)
break; // break out of main loop
word_wrap_eol = NULL;
s = CalcWordWrapNextLineStartA(s, text_end); // Wrapping skips upcoming blanks
continue;