summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-14 08:43:07 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-14 08:43:07 +0300
commit9883a206295fbdac3d4282836dca52d78c5e88dc (patch)
treef80a6d4b8b917ab68b927f90d65cade900568994 /src/ui
parentfe59111e9671fba8d1c64def9831716860ea5e44 (diff)
DocumentWidget: Keep scroll position for special responses
For example, receiving an input prompt response shouldn't change the current scroll position in the open document.
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index e138af6f..a467df10 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -2287,7 +2287,9 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
2287 } 2287 }
2288 updateFetchProgress_DocumentWidget_(d); 2288 updateFetchProgress_DocumentWidget_(d);
2289 checkResponse_DocumentWidget_(d); 2289 checkResponse_DocumentWidget_(d);
2290 init_Anim(&d->scrollY.pos, d->initNormScrollY * size_GmDocument(d->doc).y); /* TODO: unless user already scrolled! */ 2290 if (category_GmStatusCode(status_GmRequest(d->request)) == success_GmStatusCode) {
2291 init_Anim(&d->scrollY.pos, d->initNormScrollY * size_GmDocument(d->doc).y); /* TODO: unless user already scrolled! */
2292 }
2291 d->state = ready_RequestState; 2293 d->state = ready_RequestState;
2292 postProcessRequestContent_DocumentWidget_(d, iFalse); 2294 postProcessRequestContent_DocumentWidget_(d, iFalse);
2293 /* The response may be cached. */ 2295 /* The response may be cached. */