1
0
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:
Miciah Dashiel Butler Masters 2006-12-10 03:14:36 +00:00 committed by Miciah Dashiel Butler Masters
parent e523504424
commit 7db8abf6e7
2 changed files with 5 additions and 4 deletions

View File

@ -148,7 +148,7 @@ document_info_dialog(struct session *ses)
add_char_to_string(&msg, '\n');
cached = find_in_cache(location->vs.uri);
cached = doc_view->document->cached;
if (cached) {
unsigned char *a;
@ -317,5 +317,6 @@ protocol_header_dialog(struct session *ses)
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);
}

View File

@ -131,8 +131,8 @@ l_current_title(LS)
static int
l_current_document(LS)
{
if (lua_ses) {
struct cache_entry *cached = find_in_cache(cur_loc(lua_ses)->vs.uri);
if (lua_ses && lua_ses->doc_view && lua_ses->doc_view->document) {
struct cache_entry *cached = lua_ses->doc_view->document->cached;
struct fragment *f = cached ? cached->frag.next : NULL;
if (f && f->length) {