diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-04 11:24:13 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-04 11:24:13 +0300 |
commit | 7a69d53ba72f9e5581c781dd4c54dd3a3e6b89b4 (patch) | |
tree | d84af4e3d72eb02c7cc3a15e08ceda42f59f9b02 /src/app.c | |
parent | 7fff669f5be5021862ae634b65f3ab18b17021dd (diff) |
Remember scroll positions on visited pages
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -318,7 +318,7 @@ iGmCerts *certs_App(void) { | |||
318 | return app_.certs; | 318 | return app_.certs; |
319 | } | 319 | } |
320 | 320 | ||
321 | const iHistory *history_App(void) { | 321 | iHistory *history_App(void) { |
322 | return app_.history; | 322 | return app_.history; |
323 | } | 323 | } |
324 | 324 | ||
@@ -346,7 +346,9 @@ iBool handleCommand_App(const char *cmd) { | |||
346 | } | 346 | } |
347 | } | 347 | } |
348 | print_History(d->history); | 348 | print_History(d->history); |
349 | setUrl_DocumentWidget(findChild_Widget(root, "document"), url); | 349 | iDocumentWidget *doc = findChild_Widget(root, "document"); |
350 | setUrl_DocumentWidget(doc, url); | ||
351 | setInitialScroll_DocumentWidget(doc, argLabel_Command(cmd, "scroll") * gap_UI); | ||
350 | } | 352 | } |
351 | else if (equal_Command(cmd, "document.request.cancelled")) { | 353 | else if (equal_Command(cmd, "document.request.cancelled")) { |
352 | /* TODO: How should cancelled requests be treated in the history? */ | 354 | /* TODO: How should cancelled requests be treated in the history? */ |