mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-31 04:25:40 +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 {
|
else {
|
||||||
mText.insert(mCursor, text);
|
mText.insert(
|
||||||
mCursor += static_cast<unsigned int>(text.size());
|
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