From bc98556897a32ba6451131c0c7c287d586628a39 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 30 Jun 2023 00:11:48 +0200 Subject: [PATCH] impr: Automatically scroll pattern console to the bottom when new lines are added --- lib/external/imgui/source/TextEditor.cpp | 1 - plugins/builtin/source/content/views/view_pattern_editor.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/external/imgui/source/TextEditor.cpp b/lib/external/imgui/source/TextEditor.cpp index 1b0cc38b8..d0c8da96f 100644 --- a/lib/external/imgui/source/TextEditor.cpp +++ b/lib/external/imgui/source/TextEditor.cpp @@ -990,7 +990,6 @@ void TextEditor::Render() { if (mScrollToCursor) { EnsureCursorVisible(); - ImGui::SetWindowFocus(); mScrollToCursor = false; } } diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index 9b4f75903..692ec4cf3 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -302,6 +302,7 @@ namespace hex::plugin::builtin { std::scoped_lock lock(this->m_logMutex); this->m_consoleEditor.SetTextLines(*this->m_console); + this->m_consoleEditor.SetCursorPosition({ int(this->m_consoleEditor.GetTextLines().size()), 0 }); this->m_consoleNeedsUpdate = false; }