From 3e2c3955845fcba5e30843a53fbcd39dfce20248 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 21 Jun 2022 11:32:40 +0200 Subject: [PATCH] Don't append newlines on obtained text Newlines are added through the SDK, and the CTextLogger class has been modified to insert a newline when in encounters a newline character. --- r5dev/thirdparty/imgui/src/imgui_logger.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/r5dev/thirdparty/imgui/src/imgui_logger.cpp b/r5dev/thirdparty/imgui/src/imgui_logger.cpp index f43e887e..874882a3 100644 --- a/r5dev/thirdparty/imgui/src/imgui_logger.cpp +++ b/r5dev/thirdparty/imgui/src/imgui_logger.cpp @@ -76,7 +76,6 @@ std::string CTextLogger::GetText(const Coordinates & aStart, const Coordinates & { istart = 0; ++lstart; - result += '\n'; } } @@ -1075,7 +1074,7 @@ void CTextLogger::MoveDown(int aAmount, bool aSelect) assert(m_State.m_CursorPosition.m_nColumn >= 0); Coordinates oldPos = m_State.m_CursorPosition; - m_State.m_CursorPosition.m_nLine = std::max(0, std::min((int)m_Lines.size() - 1, m_State.m_CursorPosition.m_nLine + aAmount)); + m_State.m_CursorPosition.m_nLine = std::max(0, std::min(static_cast(m_Lines.size() - 1), m_State.m_CursorPosition.m_nLine + aAmount)); if (m_State.m_CursorPosition != oldPos) {