changeset 25062:042560a16d4e v8.2.3068

patch 8.2.3068: Unicode tables are slightly outdated Commit: https://github.com/vim/vim/commit/d887297ad0164516dd52cdab0308c3626337d124 Author: Christian Brabandt <cb@256bit.org> Date: Sun Jun 27 21:30:14 2021 +0200 patch 8.2.3068: Unicode tables are slightly outdated Problem: Unicode tables are slightly outdated. Solution: Update the tables for Unicode release 13. (Christian Brabandt closes #8430)
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Jun 2021 21:45:02 +0200
parents d4239ea7cdd6
children 8722607c5e3f
files runtime/tools/unicode.vim src/mbyte.c src/version.c
diffstat 3 files changed, 78 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/tools/unicode.vim
+++ b/runtime/tools/unicode.vim
@@ -195,6 +195,13 @@ func! BuildWidthTable(pattern, tableName
   let end = -1
   let ranges = []
   let dataidx = 0
+  " Account for indentation differences between ambiguous and doublewidth
+  " table in mbyte.c
+  if a:pattern == 'A'
+    let spc = '    '
+  else
+    let spc = "\t"
+  endif
   for p in s:widthprops
     if p[1][0] =~ a:pattern
       if p[0] =~ '\.\.'
@@ -229,7 +236,7 @@ func! BuildWidthTable(pattern, tableName
         else
           if start >= 0
             " produce previous range
-            call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
+            call add(ranges, printf("%s{0x%04x, 0x%04x},", spc, start, end))
 	    if a:pattern == 'A'
 	      call add(s:ambitable, [start, end])
 	    else
@@ -243,7 +250,7 @@ func! BuildWidthTable(pattern, tableName
     endif
   endfor
   if start >= 0
-    call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
+    call add(ranges, printf("%s{0x%04x, 0x%04x},", spc, start, end))
     if a:pattern == 'A'
       call add(s:ambitable, [start, end])
     else
@@ -254,11 +261,20 @@ func! BuildWidthTable(pattern, tableName
   " New buffer to put the result in.
   new
   exe "file " . a:tableName
-  call setline(1, "    static struct interval " . a:tableName . "[] =")
-  call setline(2, "    {")
+  if a:pattern == 'A'
+    call setline(1, "static struct interval " . a:tableName . "[] =")
+    call setline(2, "{")
+  else
+    call setline(1, "    static struct interval " . a:tableName . "[] =")
+    call setline(2, "    {")
+  endif
   call append('$', ranges)
   call setline('$', getline('$')[:-2])  " remove last comma
-  call setline(line('$') + 1, "    };")
+  if a:pattern == 'A'
+    call setline(line('$') + 1, "};")
+  else
+    call setline(line('$') + 1, "    };")
+  endif
   wincmd p
 endfunc
 
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -1389,7 +1389,8 @@ utf_char2cells(int c)
 	{0x26ce, 0x26ce},
 	{0x26d4, 0x26d4},
 	{0x26ea, 0x26ea},
-	{0x26f2, 0x26f5},
+	{0x26f2, 0x26f3},
+	{0x26f5, 0x26f5},
 	{0x26fa, 0x26fa},
 	{0x26fd, 0x26fd},
 	{0x2705, 0x2705},
@@ -1414,8 +1415,7 @@ utf_char2cells(int c)
 	{0x3099, 0x30ff},
 	{0x3105, 0x312f},
 	{0x3131, 0x318e},
-	{0x3190, 0x31ba},
-	{0x31c0, 0x31e3},
+	{0x3190, 0x31e3},
 	{0x31f0, 0x321e},
 	{0x3220, 0x3247},
 	{0x3250, 0x4dbf},
@@ -1431,8 +1431,10 @@ utf_char2cells(int c)
 	{0xff01, 0xff60},
 	{0xffe0, 0xffe6},
 	{0x16fe0, 0x16fe3},
+	{0x16ff0, 0x16ff1},
 	{0x17000, 0x187f7},
-	{0x18800, 0x18af2},
+	{0x18800, 0x18cd5},
+	{0x18d00, 0x18d08},
 	{0x1b000, 0x1b11e},
 	{0x1b150, 0x1b152},
 	{0x1b164, 0x1b167},
@@ -1467,20 +1469,22 @@ utf_char2cells(int c)
 	{0x1f680, 0x1f6c5},
 	{0x1f6cc, 0x1f6cc},
 	{0x1f6d0, 0x1f6d2},
-	{0x1f6d5, 0x1f6d5},
+	{0x1f6d5, 0x1f6d7},
 	{0x1f6eb, 0x1f6ec},
-	{0x1f6f4, 0x1f6fa},
+	{0x1f6f4, 0x1f6fc},
 	{0x1f7e0, 0x1f7eb},
-	{0x1f90d, 0x1f971},
-	{0x1f973, 0x1f976},
-	{0x1f97a, 0x1f9a2},
-	{0x1f9a5, 0x1f9aa},
-	{0x1f9ae, 0x1f9ca},
+	{0x1f90c, 0x1f93a},
+	{0x1f93c, 0x1f945},
+	{0x1f947, 0x1f978},
+	{0x1f97a, 0x1f9cb},
 	{0x1f9cd, 0x1f9ff},
-	{0x1fa70, 0x1fa73},
+	{0x1fa70, 0x1fa74},
 	{0x1fa78, 0x1fa7a},
-	{0x1fa80, 0x1fa82},
-	{0x1fa90, 0x1fa95},
+	{0x1fa80, 0x1fa86},
+	{0x1fa90, 0x1faa8},
+	{0x1fab0, 0x1fab6},
+	{0x1fac0, 0x1fac2},
+	{0x1fad0, 0x1fad6},
 	{0x20000, 0x2fffd},
 	{0x30000, 0x3fffd}
     };
@@ -2350,7 +2354,7 @@ utf_iscomposing(int c)
 	{0x0b3e, 0x0b44},
 	{0x0b47, 0x0b48},
 	{0x0b4b, 0x0b4d},
-	{0x0b56, 0x0b57},
+	{0x0b55, 0x0b57},
 	{0x0b62, 0x0b63},
 	{0x0b82, 0x0b82},
 	{0x0bbe, 0x0bc2},
@@ -2377,7 +2381,7 @@ utf_iscomposing(int c)
 	{0x0d4a, 0x0d4d},
 	{0x0d57, 0x0d57},
 	{0x0d62, 0x0d63},
-	{0x0d82, 0x0d83},
+	{0x0d81, 0x0d83},
 	{0x0dca, 0x0dca},
 	{0x0dcf, 0x0dd4},
 	{0x0dd6, 0x0dd6},
@@ -2424,7 +2428,7 @@ utf_iscomposing(int c)
 	{0x1a55, 0x1a5e},
 	{0x1a60, 0x1a7c},
 	{0x1a7f, 0x1a7f},
-	{0x1ab0, 0x1abe},
+	{0x1ab0, 0x1ac0},
 	{0x1b00, 0x1b04},
 	{0x1b34, 0x1b44},
 	{0x1b6b, 0x1b73},
@@ -2453,6 +2457,7 @@ utf_iscomposing(int c)
 	{0xa806, 0xa806},
 	{0xa80b, 0xa80b},
 	{0xa823, 0xa827},
+	{0xa82c, 0xa82c},
 	{0xa880, 0xa881},
 	{0xa8b4, 0xa8c5},
 	{0xa8e0, 0xa8f1},
@@ -2488,6 +2493,7 @@ utf_iscomposing(int c)
 	{0x10a3f, 0x10a3f},
 	{0x10ae5, 0x10ae6},
 	{0x10d24, 0x10d27},
+	{0x10eab, 0x10eac},
 	{0x10f46, 0x10f50},
 	{0x11000, 0x11002},
 	{0x11038, 0x11046},
@@ -2500,6 +2506,7 @@ utf_iscomposing(int c)
 	{0x11180, 0x11182},
 	{0x111b3, 0x111c0},
 	{0x111c9, 0x111cc},
+	{0x111ce, 0x111cf},
 	{0x1122c, 0x11237},
 	{0x1123e, 0x1123e},
 	{0x112df, 0x112ea},
@@ -2522,6 +2529,11 @@ utf_iscomposing(int c)
 	{0x116ab, 0x116b7},
 	{0x1171d, 0x1172b},
 	{0x1182c, 0x1183a},
+	{0x11930, 0x11935},
+	{0x11937, 0x11938},
+	{0x1193b, 0x1193e},
+	{0x11940, 0x11940},
+	{0x11942, 0x11943},
 	{0x119d1, 0x119d7},
 	{0x119da, 0x119e0},
 	{0x119e4, 0x119e4},
@@ -2549,6 +2561,8 @@ utf_iscomposing(int c)
 	{0x16f4f, 0x16f4f},
 	{0x16f51, 0x16f87},
 	{0x16f8f, 0x16f92},
+	{0x16fe4, 0x16fe4},
+	{0x16ff0, 0x16ff1},
 	{0x1bc9d, 0x1bc9e},
 	{0x1d165, 0x1d169},
 	{0x1d16d, 0x1d172},
@@ -2650,6 +2664,7 @@ static struct interval emoji_all[] =
     {0x2699, 0x2699},
     {0x269b, 0x269c},
     {0x26a0, 0x26a1},
+    {0x26a7, 0x26a7},
     {0x26aa, 0x26ab},
     {0x26b0, 0x26b1},
     {0x26bd, 0x26be},
@@ -2695,7 +2710,8 @@ static struct interval emoji_all[] =
     {0x3299, 0x3299},
     {0x1f004, 0x1f004},
     {0x1f0cf, 0x1f0cf},
-    {0x1f170, 0x1f189},
+    {0x1f170, 0x1f171},
+    {0x1f17e, 0x1f17f},
     {0x1f18e, 0x1f18e},
     {0x1f191, 0x1f19a},
     {0x1f1e6, 0x1f1ff},
@@ -2735,21 +2751,25 @@ static struct interval emoji_all[] =
     {0x1f5fa, 0x1f64f},
     {0x1f680, 0x1f6c5},
     {0x1f6cb, 0x1f6d2},
+    {0x1f6d5, 0x1f6d7},
     {0x1f6e0, 0x1f6e5},
     {0x1f6e9, 0x1f6e9},
     {0x1f6eb, 0x1f6ec},
     {0x1f6f0, 0x1f6f0},
-    {0x1f6f3, 0x1f6f9},
-    {0x1f910, 0x1f93a},
-    {0x1f93c, 0x1f93e},
-    {0x1f940, 0x1f945},
-    {0x1f947, 0x1f970},
-    {0x1f973, 0x1f976},
-    {0x1f97a, 0x1f97a},
-    {0x1f97c, 0x1f9a2},
-    {0x1f9b0, 0x1f9b9},
-    {0x1f9c0, 0x1f9c2},
-    {0x1f9d0, 0x1f9ff}
+    {0x1f6f3, 0x1f6fc},
+    {0x1f7e0, 0x1f7eb},
+    {0x1f90c, 0x1f93a},
+    {0x1f93c, 0x1f945},
+    {0x1f947, 0x1f978},
+    {0x1f97a, 0x1f9cb},
+    {0x1f9cd, 0x1f9ff},
+    {0x1fa70, 0x1fa74},
+    {0x1fa78, 0x1fa7a},
+    {0x1fa80, 0x1fa86},
+    {0x1fa90, 0x1faa8},
+    {0x1fab0, 0x1fab6},
+    {0x1fac0, 0x1fac2},
+    {0x1fad0, 0x1fad6}
 };
 
 /*
@@ -3097,6 +3117,8 @@ static convertStruct foldCase[] =
 	{0xa7c4,0xa7c4,-1,-48},
 	{0xa7c5,0xa7c5,-1,-42307},
 	{0xa7c6,0xa7c6,-1,-35384},
+	{0xa7c7,0xa7c9,2,1},
+	{0xa7f5,0xa7f5,-1,1},
 	{0xab70,0xabbf,1,-38864},
 	{0xff21,0xff3a,1,32},
 	{0x10400,0x10427,1,40},
@@ -3321,6 +3343,8 @@ static convertStruct toLower[] =
 	{0xa7c4,0xa7c4,-1,-48},
 	{0xa7c5,0xa7c5,-1,-42307},
 	{0xa7c6,0xa7c6,-1,-35384},
+	{0xa7c7,0xa7c9,2,1},
+	{0xa7f5,0xa7f5,-1,1},
 	{0xff21,0xff3a,1,32},
 	{0x10400,0x10427,1,40},
 	{0x104b0,0x104d3,1,40},
@@ -3509,7 +3533,8 @@ static convertStruct toUpper[] =
 	{0xa794,0xa794,-1,48},
 	{0xa797,0xa7a9,2,-1},
 	{0xa7b5,0xa7bf,2,-1},
-	{0xa7c3,0xa7c3,-1,-1},
+	{0xa7c3,0xa7c8,5,-1},
+	{0xa7ca,0xa7f6,44,-1},
 	{0xab53,0xab53,-1,-928},
 	{0xab70,0xabbf,1,-38864},
 	{0xff41,0xff5a,1,-32},
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3068,
+/**/
     3067,
 /**/
     3066,