Fixes the get_visible_line_count() of rich text label

(cherry picked from commit bd32c273ff)
This commit is contained in:
Umang Kalra 2020-07-09 01:32:11 +05:30 committed by Rémi Verschelde
parent b7b8f8645f
commit dc7e9d46e6

View file

@ -1021,8 +1021,8 @@ void RichTextLabel::_notification(int p_what) {
visible_line_count = 0;
while (y < size.height && from_line < main->lines.size()) {
visible_line_count += _process_line(main, text_rect.get_position(), y, text_rect.get_size().width - scroll_w, from_line, PROCESS_DRAW, base_font, base_color, font_color_shadow, use_outline, shadow_ofs, Point2i(), NULL, NULL, NULL, total_chars);
visible_line_count++;
_process_line(main, text_rect.get_position(), y, text_rect.get_size().width - scroll_w, from_line, PROCESS_DRAW, base_font, base_color, font_color_shadow, use_outline, shadow_ofs, Point2i(), NULL, NULL, NULL, total_chars);
total_chars += main->lines[from_line].char_count;
from_line++;