summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-16 14:07:06 +0100
committerGitHub <noreply@github.com>2022-02-16 14:07:06 +0100
commitfe8f4cebcea52bc770a398929378e672dfff07c1 (patch)
tree6aa886eac6c9d472e854c479b276a6e09029a391
parentf5b9cbaff6f0a058d08187b3124948ae68848cd0 (diff)
parent4d53c086ff744f343c2300d945b669d248300f26 (diff)
Merge pull request #58154 from markdibarry/fix_scroll_to_line
-rw-r--r--scene/gui/rich_text_label.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index cfd0e664be..1e8c840c66 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -3725,7 +3725,7 @@ void RichTextLabel::scroll_to_line(int p_line) {
if ((line_count <= p_line) && (line_count + main->lines[i].text_buf->get_line_count() >= p_line)) {
float line_offset = 0.f;
for (int j = 0; j < p_line - line_count; j++) {
- line_offset += main->lines[i].text_buf->get_line_size(j).y;
+ line_offset += main->lines[i].text_buf->get_line_size(j).y + get_theme_constant(SNAME("line_separation"));
}
vscroll->set_value(main->lines[i].offset.y + line_offset);
return;