Merge pull request #49239 from Paulb23/text_edit_selection_behind_minimap

Fix TextEdit selection drawing behing minimap
This commit is contained in:
Rémi Verschelde 2021-06-01 14:42:15 +02:00 committed by GitHub
commit a744983094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1187,7 +1187,8 @@ void TextEdit::_notification(int p_what) {
if (rect.position.x < xmargin_beg) {
rect.size.x -= (xmargin_beg - rect.position.x);
rect.position.x = xmargin_beg;
} else if (rect.position.x + rect.size.x > xmargin_end) {
}
if (rect.position.x + rect.size.x > xmargin_end) {
rect.size.x = xmargin_end - rect.position.x;
}
draw_rect(rect, cache.selection_color, true);