digraphs: mark new vim entries by comparing to v7.4 copy
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 23 Mar 2017 02:11:36 +0000 (03:11 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 23 Mar 2017 02:25:58 +0000 (03:25 +0100)
Vim version 8.0 introduced «.,» so save the old output to be able to
distinguish such new features, as a lot of users are unlikely to upgrade
for a while yet.

Reported-by: Skef Iterum
base.css
digraphs.plp
tools/mkdigraphlist

index 3b196fc07f200d84e6457d243d75070d550d3043..4d8d12f9d1e6b285fd420dcd302b4d674f7ef3ab 100644 (file)
--- a/base.css
+++ b/base.css
@@ -399,6 +399,7 @@ table.dimap {
 
 /* foreground representation */
 #digraphs .u-l3 {color: #080} /* partial */
+#digraphs .u-l3.ex {color: #4C0} /* experimental */
 #digraphs .u-l2 {color: #A44; color: rgba(128, 0, 0, .6)} /* unofficial proposal */
 #digraphs .u-l1 {color: #D00; color: rgba(255, 0, 0, .8)} /* minimal or invalid */
 
@@ -469,7 +470,8 @@ table.dimap {
 .l3:hover                                  {background: #FF8}
 .l4:hover                                  {background: #CF8}
 .l5:hover                                  {background: #8F8}
-.u-l3:hover    {outline: 1px solid #0F0}
+.u-l3:hover    {outline: 1px solid #080}
+.u-l3.ex:hover {outline: 1px solid #8F0}
 .u-l2:hover    {outline: 1px solid #800}
 .u-l1:hover    {outline: 1px solid #F00}
 
index 4fff67d48d5046b375df08587858dddc864acf52..e66ec8f87cadfb5d2af978188bb9252a099d1acf 100644 (file)
@@ -171,6 +171,7 @@ if ($mode) {
        <table class="glyphs"><tr>
        <td class="X u-l4">full support
        <td class="X u-l3">vim extension
+       <td class="X u-l3 ex">vim v8.0
        <td class="X u-l2">proposal
        <td class="X u-l1">not in vim
        </table>
index ab0c2f95ad201344672794a94449b6268cfa3c80..a0c5ab23488f8e331a7d876a20a57c4ee2202c1d 100755 (executable)
@@ -15,6 +15,8 @@ my $extra = do 'data/digraphs-shiar.inc.pl'
        or warn "could not include shiar proposals: ", $@ // $!;
 my $vim = do 'data/digraphs-vim.inc.pl'
        or warn "could not include vim extensions ", $@ // $!;
+my $vimold = do 'data/digraphs-vim-74.inc.pl'
+       or warn "could not include vim compatibility ", $@ // $!;
 my $di = { %{$vim // {}}, %{$rfc}, %{$extra // {}} };
 
 # optionally get unicode character information
@@ -34,9 +36,12 @@ printf "q{%s}=>[%s],\n", s/(?=[\\}])/\\/gr, join(',',
        ord $di->{$_},   # original code point
        map {"'$_'"}
        $uninfo->{ $di->{$_} }->[1] // '',  # name
-       $rfc->{$_}
-               ? $vim->{$_} ? 'l4' : 'l1'  # vim+rfc or rfc only
-               : $vim->{$_} ? 'l3' : 'l2',  # vim only or neither
+       join(' ',
+               $rfc->{$_}
+                       ? $vim->{$_} ? 'l4' : 'l1'  # vim+rfc or rfc only
+                       : $vim->{$_} ? 'l3' : 'l2', # vim only or neither
+               $vimold && $vim->{$_} && !$vimold->{$_} ? 'ex' : (), # new vim feature
+       ),
        ($uninfo->{ $di->{$_} }->[0] // '') =~ s/ u-di| u-prop| ex//gr,  # class
        $uninfo->{ $di->{$_} }->[4] // (),  # string
 ) for sort keys %{$di};