diff --git a/imgui.cpp b/imgui.cpp index 1fff5663..58bf32d5 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10795,7 +10795,6 @@ void ImFont::RenderText(float size, ImVec2 pos, ImU32 col, const ImVec4& clip_re if (!word_wrap_enabled && y + line_height < clip_rect.y) while (s < text_end && *s != '\n') // Fast-forward to next line s++; - continue; } if (c == '\r') @@ -10847,6 +10846,11 @@ void ImFont::RenderText(float size, ImVec2 pos, ImU32 col, const ImVec4& clip_re v2 = v1 + ((clip_rect.w - y1) / (y2 - y1)) * (v2 - v1); y2 = clip_rect.w; } + if (y1 >= y2) + { + x += char_width; + continue; + } } // NB: we are not calling PrimRectUV() here because non-inlined causes too much overhead in a debug build.