diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2020-08-02 11:08:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-02 11:08:30 +0000 |
commit | 8911c57eb2c76b294cf58e0b2891b7da5f1363b2 (patch) | |
tree | 16eaac964ba8a76f74c938df9d7d692940924c1c /scripts | |
parent | Update ChangeLog (diff) | |
parent | Show keyboard shortcuts in a consistent order in help (diff) | |
download | w3m-8911c57eb2c76b294cf58e0b2891b7da5f1363b2.tar.gz w3m-8911c57eb2c76b294cf58e0b2891b7da5f1363b2.zip |
Merge pull request #134 from DavidSpickett/master
Show keyboard shortcuts in a consistent order in help
Diffstat (limited to '')
-rw-r--r-- | scripts/w3mhelp.cgi.in | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in index 348d5df..11f9b68 100644 --- a/scripts/w3mhelp.cgi.in +++ b/scripts/w3mhelp.cgi.in @@ -72,22 +72,26 @@ local (%funckeydesc, $key, $fname, $desc); %funcname = (%funcname, %buf_funcname, %lineedit_funcname, %menu_funcname); %funcdesc = (%funcdesc, %buf_funcdesc, %lineedit_funcdesc, %menu_funcdesc); -while (($fname, $desc) = each %funcdesc) { - $funckeydesc{$funcname{$fname}} = "$fname\n$desc\n"; +# sort for consistent order each time this is run +foreach my $fname (sort keys %funcdesc) { + $funckeydesc{$funcname{$fname}} = "$fname\n$funcdesc{$fname}\n"; } -while (($key, $fname) = each %keyfunc) { +foreach $key (sort keys %keyfunc) { $keydata{$key} && next; - $funckeydesc{$funcname{$fname}} .= "$key,"; + $funckeydesc{$funcname{$keyfunc{$key}}} .= "$key,"; } -while (($key, $fname) = each %buf_keyfunc) { - $funckeydesc{$funcname{$fname}} .= "$key,"; +foreach $key (sort keys %buf_keyfunc) { + $keydata{$key} && next; + $funckeydesc{$funcname{$buf_keyfunc{$key}}} .= "$key,"; } -while (($key, $fname) = each %lineedit_keyfunc) { - $funckeydesc{$funcname{$fname}} .= "$key,"; +foreach $key (sort keys %lineedit_keyfunc) { + $keydata{$key} && next; + $funckeydesc{$funcname{$lineedit_keyfunc{$key}}} .= "$key,"; } -while (($key, $fname) = each %menu_keyfunc) { - $funckeydesc{$funcname{$fname}} .= "$key,"; +foreach $key (sort keys %menu_keyfunc) { + $keydata{$key} && next; + $funckeydesc{$funcname{$menu_keyfunc{$key}}} .= "$key,"; } print <<HEADING; |