termcol: show reordered cell title "0"
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 3 Nov 2015 00:14:57 +0000 (01:14 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 5 Jan 2016 00:05:07 +0000 (01:05 +0100)
termcol.plp

index affceb9..51efa0a 100644 (file)
@@ -135,7 +135,7 @@ for my $term (@termlist) {
                printf "<caption>%s</caption>\n", $caption;
                for my $num (0 .. $#{$colours}) {
                        my ($rgb, $name) = split /:/, $colours->[$num], 3;
-                       $name ||= $num;
+                       $name //= $num;
                        $name = [ $name, [] ] if $term =~ /^msx/ and !$num;
                        $name = [ $name, ['#333'] ] if $term eq 'xkcd';
                        print '<tr>', colcell($name, $rgb);