mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-01 07:58:31 +00:00
Undo newline when the word position is already at the start of the line.
This commit is contained in:
@@ -152,8 +152,10 @@ bool PrintTextWrapped( const char* text, const char* end )
|
||||
auto fwLen = ImGui::CalcTextSize( text, firstWord ).x;
|
||||
if( fwLen > left )
|
||||
{
|
||||
const auto prev = left;
|
||||
ImGui::NewLine();
|
||||
left = ImGui::GetContentRegionAvail().x;
|
||||
if( left == prev ) ImGui::SameLine( 0, 0 );
|
||||
}
|
||||
|
||||
auto endLine = ImGui::GetFont()->CalcWordWrapPosition( fontSize, text, end, left );
|
||||
|
||||
Reference in New Issue
Block a user