diff --git a/src/session/download.c b/src/session/download.c index 3b0fa81b0..bc6f732e7 100644 --- a/src/session/download.c +++ b/src/session/download.c @@ -967,10 +967,7 @@ tp_display(struct type_query *type_query) new->callback = (download_callback_T *) doc_loading_callback; new->data = ses; - if (is_in_progress_state(old->state)) - move_download(old, new, PRI_MAIN); - else - new->state = old->state; + move_download(old, new, PRI_MAIN); } display_timer(ses); diff --git a/src/session/session.c b/src/session/session.c index 9e18a02e1..37845b9eb 100644 --- a/src/session/session.c +++ b/src/session/session.c @@ -604,11 +604,19 @@ doc_loading_callback(struct download *download, struct session *ses) print_screen_status(ses); #ifdef CONFIG_GLOBHIST - if (download->conn && download->pri != PRI_CSS) { + if (download->pri != PRI_CSS) { unsigned char *title = ses->doc_view->document->title; - struct uri *uri = download->conn->proxied_uri; + struct uri *uri; - add_global_history_item(struri(uri), title, time(NULL)); + if (download->conn) + uri = download->conn->proxied_uri; + else if (download->cached) + uri = download->cached->uri; + else + uri = NULL; + + if (uri) + add_global_history_item(struri(uri), title, time(NULL)); } #endif