summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-10-21 14:46:46 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-10-21 14:46:46 +0300
commitb7028a750875c67c35902fcf814c69239959d1ab (patch)
treebfcf21bb8ed0d52b95ed66ca570bd9086d5fcdd4 /src/ui/documentwidget.c
parent07379c4553c337985ec2d903c187bb7a49dbbc9d (diff)
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.
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c2
1 files changed, 2 insertions, 0 deletions
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
1756 break; 1756 break;
1757 case SDLK_HOME: 1757 case SDLK_HOME:
1758 d->scrollY = 0; 1758 d->scrollY = 0;
1759 invalidate_VisBuf(d->visBuf);
1759 resetSmoothScroll_DocumentWidget_(d); 1760 resetSmoothScroll_DocumentWidget_(d);
1760 scroll_DocumentWidget_(d, 0); 1761 scroll_DocumentWidget_(d, 0);
1761 updateVisible_DocumentWidget_(d); 1762 updateVisible_DocumentWidget_(d);
@@ -1763,6 +1764,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
1763 return iTrue; 1764 return iTrue;
1764 case SDLK_END: 1765 case SDLK_END:
1765 d->scrollY = scrollMax_DocumentWidget_(d); 1766 d->scrollY = scrollMax_DocumentWidget_(d);
1767 invalidate_VisBuf(d->visBuf);
1766 resetSmoothScroll_DocumentWidget_(d); 1768 resetSmoothScroll_DocumentWidget_(d);
1767 scroll_DocumentWidget_(d, 0); 1769 scroll_DocumentWidget_(d, 0);
1768 updateVisible_DocumentWidget_(d); 1770 updateVisible_DocumentWidget_(d);