From b7028a750875c67c35902fcf814c69239959d1ab Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 21 Oct 2020 14:46:46 +0300 Subject: DocumentWidget: Fixed content buffering glitch When jumping to the end or the beginning of the document, reset the VisBuf completely so it will be fully redrawn. --- src/ui/documentwidget.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ui/documentwidget.c') diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 8d3716a6..25a3d638 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -1756,6 +1756,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e break; case SDLK_HOME: d->scrollY = 0; + invalidate_VisBuf(d->visBuf); resetSmoothScroll_DocumentWidget_(d); scroll_DocumentWidget_(d, 0); updateVisible_DocumentWidget_(d); @@ -1763,6 +1764,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e return iTrue; case SDLK_END: d->scrollY = scrollMax_DocumentWidget_(d); + invalidate_VisBuf(d->visBuf); resetSmoothScroll_DocumentWidget_(d); scroll_DocumentWidget_(d, 0); updateVisible_DocumentWidget_(d); -- cgit v1.2.3