Skip to content

Commit

Permalink
Fixed text editor drawing if smooth scrolling is disabled.
Browse files Browse the repository at this point in the history
Fixes godotengine#38778

(cherry picked from commit b048eb0)
  • Loading branch information
mbrlabs authored and akien-mga committed May 18, 2020
1 parent 8cab02e commit 4779d28
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4779d28

Please sign in to comment.