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 affceb936df03e1c53667f8e17b18c7ead2ec4cc..51efa0a233223940a92794089e4591df3aac1a72 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);