summaryrefslogtreecommitdiff
path: root/scene/gui/rich_text_label.cpp
diff options
context:
space:
mode:
authormarkdibarry <markdibarry@protonmail.com>2022-02-15 12:52:11 -0500
committermarkdibarry <markdibarry@protonmail.com>2022-02-15 12:52:11 -0500
commit4d53c086ff744f343c2300d945b669d248300f26 (patch)
tree9c46fcc20a5672d63920d24da9b0ce9ab5d194f2 /scene/gui/rich_text_label.cpp
parent171021145d49ffdda9110869d35ee63a946af9f8 (diff)
Fix scroll_to_line ignoring line separation
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-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 e442801e0a..5c7791ca7d 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;