mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Use document->cached in document_info_dialog and l_current_document
Now the currently displayed version of the current document, rather than the latest version of the current document, will be used for the document info box and the current_document() Lua function.
This commit is contained in:
parent
e523504424
commit
7db8abf6e7
@ -148,7 +148,7 @@ document_info_dialog(struct session *ses)
|
|||||||
|
|
||||||
add_char_to_string(&msg, '\n');
|
add_char_to_string(&msg, '\n');
|
||||||
|
|
||||||
cached = find_in_cache(location->vs.uri);
|
cached = doc_view->document->cached;
|
||||||
if (cached) {
|
if (cached) {
|
||||||
unsigned char *a;
|
unsigned char *a;
|
||||||
|
|
||||||
@ -317,5 +317,6 @@ protocol_header_dialog(struct session *ses)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cached_header_dialog(ses, find_in_cache(cur_loc(ses)->vs.uri));
|
if (ses->doc_view && ses->doc_view->document)
|
||||||
|
cached_header_dialog(ses, ses->doc_view->document->cached);
|
||||||
}
|
}
|
||||||
|
@ -131,8 +131,8 @@ l_current_title(LS)
|
|||||||
static int
|
static int
|
||||||
l_current_document(LS)
|
l_current_document(LS)
|
||||||
{
|
{
|
||||||
if (lua_ses) {
|
if (lua_ses && lua_ses->doc_view && lua_ses->doc_view->document) {
|
||||||
struct cache_entry *cached = find_in_cache(cur_loc(lua_ses)->vs.uri);
|
struct cache_entry *cached = lua_ses->doc_view->document->cached;
|
||||||
struct fragment *f = cached ? cached->frag.next : NULL;
|
struct fragment *f = cached ? cached->frag.next : NULL;
|
||||||
|
|
||||||
if (f && f->length) {
|
if (f && f->length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user