Mercurial > vim
view src/libvterm/find-wide-chars.pl @ 31805:e279b756475b v9.0.1235
patch 9.0.1235: MS-Windows console: not flushing termguicolors
Commit: https://github.com/vim/vim/commit/dc7179f9a4cc74d864d1f6414e691d25bac8f831
Author: Christopher Plewright <chris@createng.com>
Date: Mon Jan 23 12:33:23 2023 +0000
patch 9.0.1235: MS-Windows console: not flushing termguicolors
Problem: MS-Windows console: not flushing termguicolors.
Solution: Flush termguicolors. (Christopher Plewright, closes https://github.com/vim/vim/issues/11871)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 23 Jan 2023 13:45:07 +0100 |
parents | 55a373a243c0 |
children |
line wrap: on
line source
#!/usr/bin/perl use strict; use warnings; STDOUT->autoflush(1); sub iswide { my ( $cp ) = @_; return chr($cp) =~ m/\p{East_Asian_Width=Wide}|\p{East_Asian_Width=Fullwidth}/; } my ( $start, $end ); foreach my $cp ( 0 .. 0x1FFFF ) { iswide($cp) or next; if( defined $end and $end == $cp-1 ) { # extend the range $end = $cp; next; } # start a new range printf " { %#04x, %#04x },\n", $start, $end if defined $start; $start = $end = $cp; } printf " { %#04x, %#04x },\n", $start, $end if defined $start;