mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 15:15:37 +00:00
Newlines are now converted to spaces when pasting text into single-line input fields
This commit is contained in:
parent
db5948ee4b
commit
9283cdff84
|
@ -97,8 +97,12 @@ void TextEditComponent::textInput(const std::string& text, const bool pasting)
|
|||
}
|
||||
}
|
||||
else {
|
||||
mText.insert(mCursor, text);
|
||||
mCursor += static_cast<unsigned int>(text.size());
|
||||
mText.insert(
|
||||
mCursor,
|
||||
(pasting && !isMultiline() ? Utils::String::replace(text, "\n", " ") : text));
|
||||
mCursor += static_cast<unsigned int>(
|
||||
(pasting && !isMultiline() ? Utils::String::replace(text, "\n", " ") : text)
|
||||
.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue