diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 69d4c13d66..be3792ad7e 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -644,10 +644,7 @@ void TextEdit::_notification(int p_what) { Point2 cursor_pos; // get the highlighted words - String highlighted_text; - if (is_selection_active()) { - highlighted_text = get_selection_text(); - } + String highlighted_text = get_selection_text(); for (int i=0;i