diff options
| author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-02-27 08:58:28 +0200 |
|---|---|---|
| committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-02-27 08:58:28 +0200 |
| commit | 315164c6191ac25eccf54c4378451e8acf24fbfc (patch) | |
| tree | e9a5f37dc958367fdbaa48f67afdec2bbf1c8073 | |
| parent | 0cd148313213e2923004be65bafd6a3781c917ec (diff) | |
[TextEdit / IME] Check selection before deleting to avoid unnecessary error messages.
| -rw-r--r-- | scene/gui/text_edit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index ebca8296a0..7ab33d5c6c 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -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(); } |