{
if (!cursor.row()->previous()) {
if (top_y() > 0) {
- int new_y = top_y() - bv->workHeight();
+ int new_y = bv->text->top_y() - bv->workHeight();
bv->screen().draw(bv->text, bv, new_y < 0 ? 0 : new_y);
bv->updateScrollbar();
}
int y = cursor.y() - cursor.row()->baseline() +
cursor.row()->height();
if (y > top_y() + bv->workHeight()) {
- bv->screen().draw(bv->text, bv, top_y() + bv->workHeight());
+ bv->screen().draw(bv->text, bv, bv->text->top_y() + bv->workHeight());
bv->updateScrollbar();
}
return;