1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

In setup_session, copy the viewstate for the new session from the base session.

This commit is contained in:
Miciah Dashiel Butler Masters 2005-10-08 14:00:57 +00:00 committed by Miciah Dashiel Butler Masters
parent 484d07bb4d
commit 65321923b9

View File

@ -821,8 +821,16 @@ setup_first_session(struct session *ses, struct uri *uri)
static void static void
setup_session(struct session *ses, struct uri *uri, struct session *base) setup_session(struct session *ses, struct uri *uri, struct session *base)
{ {
if (base && have_location(base)) if (base && have_location(base)) {
goto_uri(ses, cur_loc(base)->vs.uri); goto_uri(ses, cur_loc(base)->vs.uri);
if (ses->doc_view && ses->doc_view->vs
&& base->doc_view && base->doc_view->vs) {
struct view_state *vs = ses->doc_view->vs;
destroy_vs(vs, 1);
copy_vs(vs, base->doc_view->vs);
}
}
if (uri) { if (uri) {
goto_uri(ses, uri); goto_uri(ses, uri);