mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 23:31:53 -05:00
Consistant scroll when using members overview, issue 11648
This commit is contained in:
@@ -4287,6 +4287,14 @@ int TextEdit::get_v_scroll() const {
|
||||
}
|
||||
void TextEdit::set_v_scroll(int p_scroll) {
|
||||
|
||||
if (p_scroll < 0) {
|
||||
p_scroll = 0;
|
||||
}
|
||||
if (!scroll_past_end_of_file_enabled) {
|
||||
if (p_scroll + get_visible_rows() > get_line_count()) {
|
||||
p_scroll = get_line_count() - get_visible_rows();
|
||||
}
|
||||
}
|
||||
v_scroll->set_value(p_scroll);
|
||||
cursor.line_ofs = p_scroll;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user