summaryrefslogtreecommitdiff
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-02-27 08:58:28 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-02-27 08:58:28 +0200
commit315164c6191ac25eccf54c4378451e8acf24fbfc (patch)
treee9a5f37dc958367fdbaa48f67afdec2bbf1c8073 /scene/gui/text_edit.cpp
parent0cd148313213e2923004be65bafd6a3781c917ec (diff)
[TextEdit / IME] Check selection before deleting to avoid unnecessary error messages.
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp2
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();
}