From 4779d289d59055ce8418d326e932ef3b43cb4663 Mon Sep 17 00:00:00 2001 From: Marcus Brummer Date: Sat, 16 May 2020 16:31:43 +0200 Subject: [PATCH] Fixed text editor drawing if smooth scrolling is disabled. Fixes #38778 (cherry picked from commit b048eb05ad978ba5e0ed93f3d0488d7fe355df5c) --- scene/gui/text_edit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 97ea9b6fd8f..07718df471c 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1135,8 +1135,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;