diff options
Diffstat (limited to 'gmi.pl')
-rwxr-xr-x | gmi.pl | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -38,7 +38,7 @@ use Term::ANSIColor; # Core use Path::Naive qw(normalize_path); # CPAN use Text::ParseWords; # Core use Term::ReadLine; # CPAN -#use Smart::Comments; # CPAN +use Smart::Comments; # CPAN use URI::Encode qw(uri_encode); # CPAN use IO::Socket::SSL::Utils; # CPAN use File::Slurper qw(read_dir read_text); # CPAN @@ -94,6 +94,7 @@ if (! -e $xdg_cache) { ### $xdg_data ### $xdg_cache my @cache; +my @cache_links; load_config(); my $wrapper = Text::Wrapper->new(columns=>$config{textwrap}, body_start=>''); @@ -306,6 +307,7 @@ sub url { if (@doc) { @cache = @doc; + @cache_links = @links; } undef(@doc); if (peer_cert($cl, $url->{host})) { @@ -825,10 +827,14 @@ sub back { if (@history >= 2) { $current_url="$history[-2][0]"; - if (@cache) { - my @array = @doc; + if ($cache[0]) { + my @dok = @doc; + my @linkz = @links; + @doc = @cache; - @cache = @array; + @links = @cache_links; + @cache = @dok; + @cache_links = @linkz; update_history( ["$current_url", "back"] ); display() if (! $display); } |