diff --git a/lib/external/imgui/source/TextEditor.cpp b/lib/external/imgui/source/TextEditor.cpp index 078e35a4a..999d19cfb 100644 --- a/lib/external/imgui/source/TextEditor.cpp +++ b/lib/external/imgui/source/TextEditor.cpp @@ -2123,7 +2123,7 @@ void TextEditor::EnsureCursorVisible() { if (len + mTextStart < left + 4) ImGui::SetScrollX(std::max(0.0f, len + mTextStart - 4)); if (len + mTextStart > right - 4) - ImGui::SetScrollX(std::max(0.0f, len + mTextStart + 4 - width)); + ImGui::SetScrollX(std::max(0.0f, len + mTextStart + 4)); } int TextEditor::GetPageSize() const {