Fix T73695: line highlight jitters with smooth scroll

This commit is contained in:
Kai Jægersen 2020-02-11 16:27:51 +11:00 committed by Campbell Barton
parent 50d5c03e2d
commit 5911b6b313
Notes: blender-bot 2023-02-14 06:42:54 +01:00
Referenced by issue #73695, Text Editor: Line highlight doesn't use scroll offset
1 changed files with 6 additions and 0 deletions

View File

@ -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);
}