summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-01-08 17:42:02 +0100
committerRémi Verschelde <remi@verschelde.fr>2016-01-08 17:42:02 +0100
commit3ad263eafe51a5d0a199c08e11ec1dca71d2e6cc (patch)
tree10e48a112d2891dba4469573ef8154b6e5d020b9 /scene/gui
parent401622cc229317bd218f070dd07a3bd8db582f16 (diff)
parent02d1ef8ca62e87443892ab5ac2da112c3f11bbe2 (diff)
Merge pull request #3279 from neikeq/issue_3259
Fix TextEdit caret being drawn when outside the visible region
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index cf60ec1daf..7f7c8c023c 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);