git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08c1056
)
charset: compare option to indicate differences with parent
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 8 Apr 2017 02:40:43 +0000
(
04:40
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 24 Apr 2017 23:51:41 +0000
(
01:51
+0200)
charset.plp
patch
|
blob
|
history
diff --git
a/charset.plp
b/charset.plp
index 5e16116a412cbb606dc5d0e6c1602175b1833bdd..49ee2e70df847938e92f1cd66f30a80de2f00d73 100644
(file)
--- a/
charset.plp
+++ b/
charset.plp
@@
-323,6
+323,20
@@
for my $row (@request) {
next;
}
+ if (exists $get{compare}) {
+ state $visible = {};
+ my $cp = $offset + $row->{offset};
+ printf '<td class="%s" title="%3$s">%2$s',
+ $cp == ord $glyph ? 'l4' :
+ $row->{parent} && $glyph eq
+ Encode::decode($row->{parent}, pack 'C', $cp) ? 'l3' :
+ $visible->{$glyph} ? 'l2' :
+ 'l1',
+ $glyphs->glyph_html($glyph);
+ $visible->{$glyph}++;
+ next;
+ }
+
print "\n".$glyphs->glyph_cell($glyph);
}
continue {