diff options
author | Kai Jægersen <kaio> | 2020-02-11 08:27:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-11 08:27:51 +0300 |
commit | 5911b6b313c7ada6d58a634ec5ec5f07fe1652a9 (patch) | |
tree | 7bb1342b0d5d9989654accdf28e638d90d114f09 /source | |
parent | 50d5c03e2d14b852c6afd3046aa8428bede85efd (diff) |
Fix T73695: line highlight jitters with smooth scroll
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 96fa9f87398..02914737229 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1338,10 +1338,16 @@ static void draw_text_decoration(SpaceText *st, ARegion *ar) wrap_offset_in_line(st, ar, text->sell, text->selc, &offl, &offc); y1 = ar->winy - (vsell - offl) * lheight; + if (st->flags & ST_SCROLL_SELECT) { + y1 += st->runtime.scroll_ofs_px[1]; + } y2 = y1 - (lheight * visible_lines); } else { y1 = ar->winy - vsell * lheight; + if (st->flags & ST_SCROLL_SELECT) { + y1 += st->runtime.scroll_ofs_px[1]; + } y2 = y1 - (lheight); } |