summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/app.c b/src/app.c
index 466a18f4..3aba28b6 100644
--- a/src/app.c
+++ b/src/app.c
@@ -340,7 +340,8 @@ iBool handleCommand_App(const char *cmd) {
340 openInDefaultBrowser_App(url); 340 openInDefaultBrowser_App(url);
341 return iTrue; 341 return iTrue;
342 } 342 }
343 if (!argLabel_Command(cmd, "history")) { 343 const iBool isHistory = argLabel_Command(cmd, "history") != 0;
344 if (!isHistory) {
344 if (argLabel_Command(cmd, "redirect")) { 345 if (argLabel_Command(cmd, "redirect")) {
345 replace_History(d->history, url); 346 replace_History(d->history, url);
346 } 347 }
@@ -348,10 +349,9 @@ iBool handleCommand_App(const char *cmd) {
348 addUrl_History(d->history, url); 349 addUrl_History(d->history, url);
349 } 350 }
350 } 351 }
351 print_History(d->history);
352 iDocumentWidget *doc = findChild_Widget(root, "document"); 352 iDocumentWidget *doc = findChild_Widget(root, "document");
353 setUrl_DocumentWidget(doc, url);
354 setInitialScroll_DocumentWidget(doc, argLabel_Command(cmd, "scroll") * gap_UI); 353 setInitialScroll_DocumentWidget(doc, argLabel_Command(cmd, "scroll") * gap_UI);
354 setUrlFromCache_DocumentWidget(doc, url, isHistory);
355 } 355 }
356 else if (equal_Command(cmd, "document.request.cancelled")) { 356 else if (equal_Command(cmd, "document.request.cancelled")) {
357 /* TODO: How should cancelled requests be treated in the history? */ 357 /* TODO: How should cancelled requests be treated in the history? */