From a04b0e515ae1cbdd78e39ae573e1869bbfe444f6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 10 Jan 2026 15:10:49 +0100 Subject: [PATCH] Undo newline when the word position is already at the start of the line. --- profiler/src/profiler/TracyImGui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profiler/src/profiler/TracyImGui.cpp b/profiler/src/profiler/TracyImGui.cpp index 528d86c3..62b54bba 100644 --- a/profiler/src/profiler/TracyImGui.cpp +++ b/profiler/src/profiler/TracyImGui.cpp @@ -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 );