mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fixed not being able to scroll to eof
(cherry picked from commit a0457341fc)
This commit is contained in:
parent
215ce6ab2b
commit
802fab11e4
1 changed files with 2 additions and 2 deletions
|
|
@ -458,7 +458,7 @@ void TextEdit::_notification(int p_what) {
|
||||||
|
|
||||||
int ascent = cache.font->get_ascent();
|
int ascent = cache.font->get_ascent();
|
||||||
|
|
||||||
int visible_rows = get_visible_rows();
|
int visible_rows = get_visible_rows() + 1;
|
||||||
|
|
||||||
int tab_w = cache.font->get_char_size(' ').width * tab_size;
|
int tab_w = cache.font->get_char_size(' ').width * tab_size;
|
||||||
|
|
||||||
|
|
@ -2904,7 +2904,7 @@ void TextEdit::adjust_viewport_to_cursor() {
|
||||||
visible_rows -= ((h_scroll->get_combined_minimum_size().height - 1) / get_row_height());
|
visible_rows -= ((h_scroll->get_combined_minimum_size().height - 1) / get_row_height());
|
||||||
|
|
||||||
if (cursor.line >= (cursor.line_ofs + visible_rows))
|
if (cursor.line >= (cursor.line_ofs + visible_rows))
|
||||||
cursor.line_ofs = cursor.line - visible_rows + 1;
|
cursor.line_ofs = cursor.line - visible_rows;
|
||||||
if (cursor.line < cursor.line_ofs)
|
if (cursor.line < cursor.line_ofs)
|
||||||
cursor.line_ofs = cursor.line;
|
cursor.line_ofs = cursor.line;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue