Skip to content

Commit

Permalink
Fixed underlines and striketrough not respecting visible character
Browse files Browse the repository at this point in the history
  • Loading branch information
Janglee123 committed Apr 7, 2020
1 parent 1222541 commit 9c2c2ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9c2c2ab

Please sign in to comment.