From 02d1ef8ca62e87443892ab5ac2da112c3f11bbe2 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Fri, 8 Jan 2016 17:33:42 +0100 Subject: Fix TextEdit caret drawn when outside the visible region --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 70da7e39a4..6e31cd97ef 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -839,7 +839,7 @@ void TextEdit::_notification(int p_what) { } - if (cursor.column==str.length() && cursor.line==line) { + if (cursor.column==str.length() && cursor.line==line && (char_ofs+char_margin)>=xmargin_beg) { cursor_pos=Point2i( char_ofs+char_margin, ofs_y ); VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(cursor_pos, Size2i(1,get_row_height())),cache.font_color); -- cgit v1.2.3