diff options
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 53f44868..c3728b75 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -377,7 +377,7 @@ void deinit_DocumentWidget(iDocumentWidget *d) { | |||
377 | removeTicker_App(prerender_DocumentWidget_, d); | 377 | removeTicker_App(prerender_DocumentWidget_, d); |
378 | remove_Periodic(periodic_App(), d); | 378 | remove_Periodic(periodic_App(), d); |
379 | delete_Translation(d->translation); | 379 | delete_Translation(d->translation); |
380 | delete_DrawBufs(d->drawBufs); | 380 | delete_DrawBufs(d->drawBufs); |
381 | delete_VisBuf(d->visBuf); | 381 | delete_VisBuf(d->visBuf); |
382 | free(d->visBufMeta); | 382 | free(d->visBufMeta); |
383 | delete_PtrSet(d->invalidRuns); | 383 | delete_PtrSet(d->invalidRuns); |
@@ -1273,10 +1273,14 @@ static void smoothScroll_DocumentWidget_(iDocumentWidget *d, int offset, int dur | |||
1273 | int destY = targetValue_Anim(&d->scrollY) + offset; | 1273 | int destY = targetValue_Anim(&d->scrollY) + offset; |
1274 | if (destY < 0) { | 1274 | if (destY < 0) { |
1275 | destY = 0; | 1275 | destY = 0; |
1276 | stopWidgetMomentum_Touch(as_Widget(d)); | ||
1276 | } | 1277 | } |
1277 | const int scrollMax = scrollMax_DocumentWidget_(d); | 1278 | const int scrollMax = scrollMax_DocumentWidget_(d); |
1278 | if (scrollMax > 0) { | 1279 | if (scrollMax > 0) { |
1279 | destY = iMin(destY, scrollMax); | 1280 | if (destY >= scrollMax) { |
1281 | stopWidgetMomentum_Touch(as_Widget(d)); | ||
1282 | destY = scrollMax; | ||
1283 | } | ||
1280 | } | 1284 | } |
1281 | else { | 1285 | else { |
1282 | destY = 0; | 1286 | destY = 0; |