comparison src/libvterm/find-wide-chars.pl @ 20498:55a373a243c0 v8.2.0803

patch 8.2.0803: libvterm code lags behind the upstream version Commit: https://github.com/vim/vim/commit/83a52533b23c88f90be0dea01bc5e32ddadc1d6a Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 20 19:30:19 2020 +0200 patch 8.2.0803: libvterm code lags behind the upstream version Problem: Libvterm code lags behind the upstream version. Solution: Include revisions 764 - 767
author Bram Moolenaar <Bram@vim.org>
date Wed, 20 May 2020 19:45:04 +0200
parents e02d45e302a2
children
comparison
equal deleted inserted replaced
20497:1f96d44df1a7 20498:55a373a243c0
1 #!/usr/bin/perl 1 #!/usr/bin/perl
2 2
3 use strict; 3 use strict;
4 use warnings; 4 use warnings;
5
6 use Unicode::UCD qw( charprop );
7 5
8 STDOUT->autoflush(1); 6 STDOUT->autoflush(1);
9 7
10 sub iswide 8 sub iswide
11 { 9 {
12 my ( $cp ) = @_; 10 my ( $cp ) = @_;
13 11 return chr($cp) =~ m/\p{East_Asian_Width=Wide}|\p{East_Asian_Width=Fullwidth}/;
14 my $width = charprop( $cp, "East_Asian_Width" ) or return;
15 return $width eq "Wide" || $width eq "Fullwidth";
16 } 12 }
17 13
18 my ( $start, $end ); 14 my ( $start, $end );
19 foreach my $cp ( 0 .. 0x1FFFF ) { 15 foreach my $cp ( 0 .. 0x1FFFF ) {
20 iswide($cp) or next; 16 iswide($cp) or next;