git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
termcol: parent attribute to inherit common palette order
[sheet.git]
/
termcol.plp
diff --git
a/termcol.plp
b/termcol.plp
index b3bb7b5f709fd819ab591696274328574aa1c10c..92bc4f87d3d5aa69fc2d04ade2c3a200e45308ef 100644
(file)
--- a/
termcol.plp
+++ b/
termcol.plp
@@
-128,7
+128,10
@@
for my $term (@termlist) {
}
if (my $palette = $info->{list}) {
}
if (my $palette = $info->{list}) {
- my $colours = colorder($palette, $get{v} && $info->{ansiorder});
+ my $order = $get{v} && 'ansiorder';
+ my $colours = colorder($palette,
+ $info->{$order} // $palettes->{ $info->{parent} }->{$order}
+ );
my $rows = 8;
my $columns = ceil(@{$palette} / $rows);
my $rows = 8;
my $columns = ceil(@{$palette} / $rows);
@@
-148,7
+151,9
@@
for my $term (@termlist) {
}
for (@draw) {
}
for (@draw) {
- my $imgpal = colorder($palette, $info->{ansiorder});
+ my $imgpal = colorder($palette,
+ $info->{ansiorder} // $palettes->{ $info->{parent} }->{ansiorder}
+ );
print "<tr><td colspan=$columns>", img_egapal($imgpal, @{$_});
}
print "</table>\n\n";
print "<tr><td colspan=$columns>", img_egapal($imgpal, @{$_});
}
print "</table>\n\n";