mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +00:00
Merge pull request #3279 from neikeq/issue_3259
Fix TextEdit caret being drawn when outside the visible region
This commit is contained in:
commit
3ad263eafe
1 changed files with 1 additions and 1 deletions
|
|
@ -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 );
|
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);
|
VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(cursor_pos, Size2i(1,get_row_height())),cache.font_color);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue