[TextEdit / IME] Check selection before deleting to avoid unnecessary error messages.

This commit is contained in:
bruvzg 2023-02-27 08:58:28 +02:00
parent 0cd1483132
commit 315164c619
No known key found for this signature in database
GPG Key ID: 7960FCF39844EC38

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();
}