Merge pull request #74029 from bruvzg/ime_textedit_complex

[TextEdit / IME] Check selection before deleting to avoid unnecessary error messages.
This commit is contained in:
Rémi Verschelde 2023-02-27 08:25:25 +01:00
commit b8e8572a1d
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1548,7 +1548,7 @@ void TextEdit::_notification(int p_what) {
ime_text = DisplayServer::get_singleton()->ime_get_text();
ime_selection = DisplayServer::get_singleton()->ime_get_selection();
if (!ime_text.is_empty()) {
if (!ime_text.is_empty() && has_selection()) {
delete_selection();
}