Fix T73695: line highlight jitters with smooth scroll
This commit is contained in:
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
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue