fix: Pattern editor not scrolling all the way to the right when typing

This commit is contained in:
WerWolv
2023-01-10 13:27:16 +01:00
parent ef3627321c
commit be1f711fda

View File

@@ -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 {