summaryrefslogtreecommitdiffstats
path: root/scene
diff options
context:
space:
mode:
authorMarcus Brummer <mbrlabs7@gmail.com>2020-05-16 16:31:43 +0200
committerMarcus Brummer <mbrlabs7@gmail.com>2020-05-16 16:31:43 +0200
commitb048eb05ad978ba5e0ed93f3d0488d7fe355df5c (patch)
treeaa0ac07347ccd10f4821544ea805bf6aac75490b /scene
parentac58372db824b74b8c4feb948434b924c573b847 (diff)
downloadredot-engine-b048eb05ad978ba5e0ed93f3d0488d7fe355df5c.tar.gz
Fixed text editor drawing if smooth scrolling is disabled.
Fixes #38778
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp4
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;