diff --git a/es-core/src/components/TextEditComponent.cpp b/es-core/src/components/TextEditComponent.cpp index 658864c81..a895f01e3 100644 --- a/es-core/src/components/TextEditComponent.cpp +++ b/es-core/src/components/TextEditComponent.cpp @@ -97,8 +97,12 @@ void TextEditComponent::textInput(const std::string& text, const bool pasting) } } else { - mText.insert(mCursor, text); - mCursor += static_cast(text.size()); + mText.insert( + mCursor, + (pasting && !isMultiline() ? Utils::String::replace(text, "\n", " ") : text)); + mCursor += static_cast( + (pasting && !isMultiline() ? Utils::String::replace(text, "\n", " ") : text) + .size()); } }