From 4d53c086ff744f343c2300d945b669d248300f26 Mon Sep 17 00:00:00 2001 From: markdibarry Date: Tue, 15 Feb 2022 12:52:11 -0500 Subject: [PATCH] Fix scroll_to_line ignoring line separation --- scene/gui/rich_text_label.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index e442801e0a0..5c7791ca7d1 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -3718,7 +3718,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;