diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-16 19:26:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 19:26:55 +0200 |
commit | 163687d17a8a11da3cf1a3595c511a5f8fc94571 (patch) | |
tree | 8b122a0f732d100b9b053b12bdb97cdc32244aeb /scene | |
parent | 1702fb7ad2b2e072ff74f579f9d243db96e7b480 (diff) | |
parent | b048eb05ad978ba5e0ed93f3d0488d7fe355df5c (diff) | |
download | redot-engine-163687d17a8a11da3cf1a3595c511a5f8fc94571.tar.gz |
Merge pull request #38782 from mbrlabs/text-editor-fix
Fixed text editor drawing if smooth scrolling is disabled.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/text_edit.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 52aee8f089..932dda2f9d 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1121,9 +1121,7 @@ void TextEdit::_notification(int p_what) { int ofs_y = (i * get_row_height() + cache.line_spacing / 2) + ofs_readonly; ofs_y -= cursor.wrap_ofs * get_row_height(); - if (smooth_scroll_enabled) { - ofs_y += (-get_v_scroll_offset()) * get_row_height(); - } + ofs_y -= get_v_scroll_offset() * get_row_height(); // Check if line contains highlighted word. int highlighted_text_col = -1; |