Cyril Brulebois (26/09/2008): > it'd be nice if the references on the identifier search results page > could be sorted also by lines and not only by files. Please find > attached a patch to do so.
Bleh, it's better when one uses the appropriate sort function. Should have really used it, rather than overlooked that line ordering changed… -- Cyril Brulebois
--- a/ident +++ b/ident @@ -89,7 +91,7 @@ sub usesexpand { my @uses = $index->getreference($identifier, $release); my $file_hits = 0; my $last_file; - foreach my $ref (sort { $$a[0] cmp $$b[0] } @uses) { + foreach my $ref (sort { $$a[0] cmp $$b[0] || $$a[1] <=> $$b[1] } @uses) { my ($file, $line) = @$ref; $file_hits++ if $file ne $last_file; $last_file = $file;
signature.asc
Description: This is a digitally signed message part.