From 1bfcf8f33917ca62cf85b80e841327f1d73bb1a3 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 30 Nov 2018 16:42:32 +0100 Subject: [PATCH] Separator: Fixed Separator() outputting an extraneous empty line when captured into clipboard/text/file. --- docs/CHANGELOG.txt | 1 + imgui_widgets.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 93efabbc..0f861ad2 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -38,6 +38,7 @@ Breaking Changes: Other Changes: - When the focused window become inactive don't restore focus to a window with the ImGuiWindowFlags_NoInputs flag. (#2213) [@zzzyap] +- Separator: Fixed Separator() outputting an extraneous empty line when captured into clipboard/text/file. - Examples: SDL: changed the signature of ImGui_ImplSDL2_ProcessEvent() to use a const SDL_Event*. (#2187) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 1f426343..792d80f0 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -1153,7 +1153,7 @@ void ImGui::Separator() window->DrawList->AddLine(bb.Min, ImVec2(bb.Max.x,bb.Min.y), GetColorU32(ImGuiCol_Separator)); if (g.LogEnabled) - LogRenderedText(NULL, IM_NEWLINE "--------------------------------"); + LogRenderedText(&bb.Min, "--------------------------------"); if (window->DC.ColumnsSet) {