Mercurial > vim
annotate src/libvterm/find-wide-chars.pl @ 33710:385aaea67d33 v9.0.2089
patch 9.0.2089: sound_playfile() fails when using powershell
Commit: https://github.com/vim/vim/commit/15d270019e88a8ba67618adf5efe1aaa81ce354b
Author: GuyBrush <miguel.barro@live.com>
Date: Sat Nov 4 09:48:53 2023 +0100
patch 9.0.2089: sound_playfile() fails when using powershell
Problem: sound_playfile() fails when using powershell
Solution: quote filename using doublequotes, don't escape filename,
because it doesn't use the shell
Avoiding powershell escaping because mci open command doesn't support
single quoted filenames: open 'C:\whatever\sound.wav' is not valid.
closes: #13471
Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 04 Nov 2023 10:00:05 +0100 |
parents | 55a373a243c0 |
children |
rev | line source |
---|---|
20443
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 #!/usr/bin/perl |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
3 use strict; |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
4 use warnings; |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
5 |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
6 STDOUT->autoflush(1); |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
7 |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 sub iswide |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 { |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
10 my ( $cp ) = @_; |
20498
55a373a243c0
patch 8.2.0803: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20443
diff
changeset
|
11 return chr($cp) =~ m/\p{East_Asian_Width=Wide}|\p{East_Asian_Width=Fullwidth}/; |
20443
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
12 } |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
13 |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
14 my ( $start, $end ); |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
15 foreach my $cp ( 0 .. 0x1FFFF ) { |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
16 iswide($cp) or next; |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
17 |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
18 if( defined $end and $end == $cp-1 ) { |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
19 # extend the range |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
20 $end = $cp; |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
21 next; |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
22 } |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
23 |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
24 # start a new range |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
25 printf " { %#04x, %#04x },\n", $start, $end if defined $start; |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
26 |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
27 $start = $end = $cp; |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
28 } |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
29 |
e02d45e302a2
patch 8.2.0776: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
30 printf " { %#04x, %#04x },\n", $start, $end if defined $start; |