Merge pull request #37656 from Janglee123/richtext-underline-fix

Fixed underlines and striketrough not respecting visible character
This commit is contained in:
Rémi Verschelde 2020-04-07 15:46:36 +02:00 committed by GitHub
commit a10f28ff34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -411,7 +411,6 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
break; //don't allow lines longer than assigned width
}
w += cw;
fw += cw;
end++;
@ -552,8 +551,10 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
}
}
if (visible)
if (visible) {
line_is_blank = false;
w += font->get_char_size(c[i], c[i + 1]).x;
}
if (c[i] == '\t')
visible = false;