From aea0761b25276527e2f0099fb8b05a4a879d3c44 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sun, 13 Oct 2019 15:29:20 +0100 Subject: Place caret at 0,0 when setting text not at the end --- scene/gui/text_edit.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scene/gui') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index a22ddb265b..adaff17fbb 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4751,6 +4751,9 @@ void TextEdit::set_text(String p_text) { selection.active = false; } + cursor_set_line(0); + cursor_set_column(0); + update(); setting_text = false; }; -- cgit v1.2.3