--- deliantra/Deliantra-Client/bin/cfplus 2006/08/14 01:21:02 1.114
+++ deliantra/Deliantra-Client/bin/cfplus 2006/08/14 03:41:29 1.115
@@ -1530,7 +1530,7 @@
my $curnode;
my $load_node; $load_node = sub {
- my ($node) = @_;
+ my ($node, $para) = @_;
$buttons->clear;
@@ -1539,8 +1539,8 @@
text => "⋘",
tooltip => "back to " . (CFPlus::asxml CFPlus::Pod::full_path $history[-1]) . "",
on_activate => sub {
- unshift @future, $curnode if $curnode;
- $load_node->(pop @history);
+ unshift @future, [$curnode, $viewer->current_paragraph] if $curnode;
+ $load_node->(@{pop @history});
},
);
}
@@ -1550,8 +1550,8 @@
text => "⋙",
tooltip => "forward to " . (CFPlus::asxml CFPlus::Pod::full_path $future[0]) . "",
on_activate => sub {
- push @history, $curnode;
- $load_node->(shift @future);
+ push @history, [$curnode, $viewer->current_paragraph];
+ $load_node->(@{shift @future});
},
);
}
@@ -1566,7 +1566,7 @@
text => $node->{kw}[0],
tooltip => "go to " . (CFPlus::asxml CFPlus::Pod::full_path $node) . "",
on_activate => sub {
- push @history, $curnode if $curnode; @future = ();
+ push @history, [$curnode, $viewer->current_paragraph] if $curnode; @future = ();
$load_node->($node);
},
);
@@ -1579,7 +1579,7 @@
$viewer->clear;
$viewer->add_paragraph (CFPlus::Pod::as_paragraphs CFPlus::Pod::section_of $curnode);
- $viewer->set_offset (0);
+ $viewer->scroll_to ($para);
};
$load_node->(CFPlus::Pod::find pod => "mainpage");
@@ -1587,7 +1587,7 @@
$CFPlus::Pod::goto_document = sub {
my (@path) = @_;
- push @history, $curnode if $curnode; @future = ();
+ push @history, [$curnode, $viewer->current_paragraph] if $curnode; @future = ();
$load_node->(CFPlus::Pod::find @path);
$win->show;