From 315164c6191ac25eccf54c4378451e8acf24fbfc Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 27 Feb 2023 08:58:28 +0200 Subject: [TextEdit / IME] Check selection before deleting to avoid unnecessary error messages. --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/gui/text_edit.cpp') 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(); } -- cgit v1.2.3