Browse Source

Place caret at 0,0 when setting text not at the end

Paulb23 5 years ago
parent
commit
aea0761b25
1 changed files with 3 additions and 0 deletions
  1. 3 0
      scene/gui/text_edit.cpp

+ 3 - 0
scene/gui/text_edit.cpp

@@ -4751,6 +4751,9 @@ void TextEdit::set_text(String p_text) {
 		selection.active = false;
 		selection.active = false;
 	}
 	}
 
 
+	cursor_set_line(0);
+	cursor_set_column(0);
+
 	update();
 	update();
 	setting_text = false;
 	setting_text = false;
 };
 };