Merge pull request #38782 from mbrlabs/text-editor-fix
Fixed text editor drawing if smooth scrolling is disabled.
This commit is contained in:
commit
163687d17a
1 changed files with 1 additions and 3 deletions
|
@ -1121,9 +1121,7 @@ void TextEdit::_notification(int p_what) {
|
||||||
|
|
||||||
int ofs_y = (i * get_row_height() + cache.line_spacing / 2) + ofs_readonly;
|
int ofs_y = (i * get_row_height() + cache.line_spacing / 2) + ofs_readonly;
|
||||||
ofs_y -= cursor.wrap_ofs * get_row_height();
|
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.
|
// Check if line contains highlighted word.
|
||||||
int highlighted_text_col = -1;
|
int highlighted_text_col = -1;
|
||||||
|
|
Loading…
Reference in a new issue