changeset 11539:f7ba69508fd5 v8.0.0652

patch 8.0.0652: unicode information is outdated commit https://github.com/vim/vim/commit/383aa84c0d3456c12987ba7e12042dcffba0eac6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 22 15:27:37 2017 +0200 patch 8.0.0652: unicode information is outdated Problem: Unicode information is outdated. Solution: Update to Unicode 10. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Thu, 22 Jun 2017 15:30:03 +0200
parents 072c02490122
children 1bbefae25cfe
files runtime/tools/unicode.vim src/mbyte.c src/version.c
diffstat 3 files changed, 118 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/tools/unicode.vim
+++ b/runtime/tools/unicode.vim
@@ -3,6 +3,7 @@
 " http://www.unicode.org/Public/5.1.0/ucd/UCD.html
 " For the other files see the header.
 "
+" Might need to update the URL to the emoji-data.txt
 " Usage: Vim -S <this-file>
 "
 " Author: Bram Moolenaar
@@ -382,8 +383,9 @@ let s:ambitable = []
 call BuildWidthTable('A', 'ambiguous')
 
 " Edit the emoji text file.  Requires the netrw plugin.
-edit http://www.unicode.org/Public/emoji/3.0/emoji-data.txt
+edit http://unicode.org/Public/emoji/5.0/emoji-data.txt
+"edit http://www.unicode.org/Public/emoji/latest/emoji-data.txt
 
 " Build the emoji table. Ver. 1.0 - 6.0
 " Must come after the "ambiguous" table
-call BuildEmojiTable('; Emoji\s\+# [1-6]\.[0-9]', 'emoji')
+call BuildEmojiTable('; Emoji\s\+#\s\+\d\+\.\d', 'emoji')
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -1451,7 +1451,7 @@ utf_char2cells(int c)
 	{0x3000, 0x303e},
 	{0x3041, 0x3096},
 	{0x3099, 0x30ff},
-	{0x3105, 0x312d},
+	{0x3105, 0x312e},
 	{0x3131, 0x318e},
 	{0x3190, 0x31ba},
 	{0x31c0, 0x31e3},
@@ -1470,10 +1470,11 @@ utf_char2cells(int c)
 	{0xfe68, 0xfe6b},
 	{0xff01, 0xff60},
 	{0xffe0, 0xffe6},
-	{0x16fe0, 0x16fe0},
+	{0x16fe0, 0x16fe1},
 	{0x17000, 0x187ec},
 	{0x18800, 0x18af2},
-	{0x1b000, 0x1b001},
+	{0x1b000, 0x1b11e},
+	{0x1b170, 0x1b2fb},
 	{0x1f004, 0x1f004},
 	{0x1f0cf, 0x1f0cf},
 	{0x1f18e, 0x1f18e},
@@ -1482,6 +1483,7 @@ utf_char2cells(int c)
 	{0x1f210, 0x1f23b},
 	{0x1f240, 0x1f248},
 	{0x1f250, 0x1f251},
+	{0x1f260, 0x1f265},
 	{0x1f300, 0x1f320},
 	{0x1f32d, 0x1f335},
 	{0x1f337, 0x1f37c},
@@ -1504,15 +1506,13 @@ utf_char2cells(int c)
 	{0x1f6cc, 0x1f6cc},
 	{0x1f6d0, 0x1f6d2},
 	{0x1f6eb, 0x1f6ec},
-	{0x1f6f4, 0x1f6f6},
-	{0x1f910, 0x1f91e},
-	{0x1f920, 0x1f927},
-	{0x1f930, 0x1f930},
-	{0x1f933, 0x1f93e},
-	{0x1f940, 0x1f94b},
-	{0x1f950, 0x1f95e},
-	{0x1f980, 0x1f991},
+	{0x1f6f4, 0x1f6f8},
+	{0x1f910, 0x1f93e},
+	{0x1f940, 0x1f94c},
+	{0x1f950, 0x1f96b},
+	{0x1f980, 0x1f997},
 	{0x1f9c0, 0x1f9c0},
+	{0x1f9d0, 0x1f9e6},
 	{0x20000, 0x2fffd},
 	{0x30000, 0x3fffd}
     };
@@ -1522,25 +1522,45 @@ utf_char2cells(int c)
      * based on http://unicode.org/emoji/charts/emoji-list.html */
     static struct interval emoji_width[] =
     {
-	{0x1f004, 0x1f004},
-	{0x1f0cf, 0x1f0cf},
 	{0x1f1e6, 0x1f1ff},
-	{0x1f300, 0x1f320},
-	{0x1f330, 0x1f335},
-	{0x1f337, 0x1f37c},
-	{0x1f380, 0x1f393},
-	{0x1f3a0, 0x1f3c4},
-	{0x1f3c6, 0x1f3ca},
-	{0x1f3e0, 0x1f3f0},
-	{0x1f400, 0x1f43e},
-	{0x1f440, 0x1f440},
-	{0x1f442, 0x1f4f7},
-	{0x1f4f9, 0x1f4fc},
-	{0x1f500, 0x1f53d},
-	{0x1f550, 0x1f567},
-	{0x1f5fb, 0x1f640},
-	{0x1f645, 0x1f64f},
-	{0x1f680, 0x1f6c5}
+	{0x1f321, 0x1f321},
+	{0x1f324, 0x1f32c},
+	{0x1f336, 0x1f336},
+	{0x1f37d, 0x1f37d},
+	{0x1f396, 0x1f397},
+	{0x1f399, 0x1f39b},
+	{0x1f39e, 0x1f39f},
+	{0x1f3cb, 0x1f3ce},
+	{0x1f3d4, 0x1f3df},
+	{0x1f3f3, 0x1f3f5},
+	{0x1f3f7, 0x1f3f7},
+	{0x1f43f, 0x1f43f},
+	{0x1f441, 0x1f441},
+	{0x1f4fd, 0x1f4fd},
+	{0x1f549, 0x1f54a},
+	{0x1f56f, 0x1f570},
+	{0x1f573, 0x1f579},
+	{0x1f587, 0x1f587},
+	{0x1f58a, 0x1f58d},
+	{0x1f590, 0x1f590},
+	{0x1f5a5, 0x1f5a5},
+	{0x1f5a8, 0x1f5a8},
+	{0x1f5b1, 0x1f5b2},
+	{0x1f5bc, 0x1f5bc},
+	{0x1f5c2, 0x1f5c4},
+	{0x1f5d1, 0x1f5d3},
+	{0x1f5dc, 0x1f5de},
+	{0x1f5e1, 0x1f5e1},
+	{0x1f5e3, 0x1f5e3},
+	{0x1f5e8, 0x1f5e8},
+	{0x1f5ef, 0x1f5ef},
+	{0x1f5f3, 0x1f5f3},
+	{0x1f5fa, 0x1f5fa},
+	{0x1f6cb, 0x1f6cf},
+	{0x1f6e0, 0x1f6e5},
+	{0x1f6e9, 0x1f6e9},
+	{0x1f6f0, 0x1f6f0},
+	{0x1f6f3, 0x1f6f3}
     };
 
     if (c >= 0x100)
@@ -2338,6 +2358,7 @@ utf_iscomposing(int c)
 	{0x0ac7, 0x0ac9},
 	{0x0acb, 0x0acd},
 	{0x0ae2, 0x0ae3},
+	{0x0afa, 0x0aff},
 	{0x0b01, 0x0b03},
 	{0x0b3c, 0x0b3c},
 	{0x0b3e, 0x0b44},
@@ -2363,7 +2384,8 @@ utf_iscomposing(int c)
 	{0x0cca, 0x0ccd},
 	{0x0cd5, 0x0cd6},
 	{0x0ce2, 0x0ce3},
-	{0x0d01, 0x0d03},
+	{0x0d00, 0x0d03},
+	{0x0d3b, 0x0d3c},
 	{0x0d3e, 0x0d44},
 	{0x0d46, 0x0d48},
 	{0x0d4a, 0x0d4d},
@@ -2429,8 +2451,8 @@ utf_iscomposing(int c)
 	{0x1cd4, 0x1ce8},
 	{0x1ced, 0x1ced},
 	{0x1cf2, 0x1cf4},
-	{0x1cf8, 0x1cf9},
-	{0x1dc0, 0x1df5},
+	{0x1cf7, 0x1cf9},
+	{0x1dc0, 0x1df9},
 	{0x1dfb, 0x1dff},
 	{0x20d0, 0x20f0},
 	{0x2cef, 0x2cf1},
@@ -2509,10 +2531,21 @@ utf_iscomposing(int c)
 	{0x11630, 0x11640},
 	{0x116ab, 0x116b7},
 	{0x1171d, 0x1172b},
+	{0x11a01, 0x11a0a},
+	{0x11a33, 0x11a39},
+	{0x11a3b, 0x11a3e},
+	{0x11a47, 0x11a47},
+	{0x11a51, 0x11a5b},
+	{0x11a8a, 0x11a99},
 	{0x11c2f, 0x11c36},
 	{0x11c38, 0x11c3f},
 	{0x11c92, 0x11ca7},
 	{0x11ca9, 0x11cb6},
+	{0x11d31, 0x11d36},
+	{0x11d3a, 0x11d3a},
+	{0x11d3c, 0x11d3d},
+	{0x11d3f, 0x11d45},
+	{0x11d47, 0x11d47},
 	{0x16af0, 0x16af4},
 	{0x16b30, 0x16b36},
 	{0x16f51, 0x16f7e},
@@ -2583,6 +2616,7 @@ static struct interval emoji_all[] =
     {0x2328, 0x2328},
     {0x23cf, 0x23cf},
     {0x23e9, 0x23f3},
+    {0x23f8, 0x23fa},
     {0x24c2, 0x24c2},
     {0x25aa, 0x25ab},
     {0x25b6, 0x25b6},
@@ -2600,6 +2634,8 @@ static struct interval emoji_all[] =
     {0x262a, 0x262a},
     {0x262e, 0x262f},
     {0x2638, 0x263a},
+    {0x2640, 0x2640},
+    {0x2642, 0x2642},
     {0x2648, 0x2653},
     {0x2660, 0x2660},
     {0x2663, 0x2663},
@@ -2607,8 +2643,7 @@ static struct interval emoji_all[] =
     {0x2668, 0x2668},
     {0x267b, 0x267b},
     {0x267f, 0x267f},
-    {0x2692, 0x2694},
-    {0x2696, 0x2697},
+    {0x2692, 0x2697},
     {0x2699, 0x2699},
     {0x269b, 0x269c},
     {0x26a0, 0x26a1},
@@ -2667,22 +2702,50 @@ static struct interval emoji_all[] =
     {0x1f22f, 0x1f22f},
     {0x1f232, 0x1f23a},
     {0x1f250, 0x1f251},
-    {0x1f300, 0x1f320},
-    {0x1f330, 0x1f335},
-    {0x1f337, 0x1f37c},
-    {0x1f380, 0x1f393},
-    {0x1f3a0, 0x1f3c4},
-    {0x1f3c6, 0x1f3ca},
-    {0x1f3e0, 0x1f3f0},
-    {0x1f400, 0x1f43e},
-    {0x1f440, 0x1f440},
-    {0x1f442, 0x1f4f7},
-    {0x1f4f9, 0x1f4fc},
-    {0x1f500, 0x1f53d},
+    {0x1f300, 0x1f321},
+    {0x1f324, 0x1f393},
+    {0x1f396, 0x1f397},
+    {0x1f399, 0x1f39b},
+    {0x1f39e, 0x1f3f0},
+    {0x1f3f3, 0x1f3f5},
+    {0x1f3f7, 0x1f4fd},
+    {0x1f4ff, 0x1f53d},
+    {0x1f549, 0x1f54e},
     {0x1f550, 0x1f567},
-    {0x1f5fb, 0x1f640},
-    {0x1f645, 0x1f64f},
-    {0x1f680, 0x1f6c5}
+    {0x1f56f, 0x1f570},
+    {0x1f573, 0x1f57a},
+    {0x1f587, 0x1f587},
+    {0x1f58a, 0x1f58d},
+    {0x1f590, 0x1f590},
+    {0x1f595, 0x1f596},
+    {0x1f5a4, 0x1f5a5},
+    {0x1f5a8, 0x1f5a8},
+    {0x1f5b1, 0x1f5b2},
+    {0x1f5bc, 0x1f5bc},
+    {0x1f5c2, 0x1f5c4},
+    {0x1f5d1, 0x1f5d3},
+    {0x1f5dc, 0x1f5de},
+    {0x1f5e1, 0x1f5e1},
+    {0x1f5e3, 0x1f5e3},
+    {0x1f5e8, 0x1f5e8},
+    {0x1f5ef, 0x1f5ef},
+    {0x1f5f3, 0x1f5f3},
+    {0x1f5fa, 0x1f64f},
+    {0x1f680, 0x1f6c5},
+    {0x1f6cb, 0x1f6d2},
+    {0x1f6e0, 0x1f6e5},
+    {0x1f6e9, 0x1f6e9},
+    {0x1f6eb, 0x1f6ec},
+    {0x1f6f0, 0x1f6f0},
+    {0x1f6f3, 0x1f6f8},
+    {0x1f910, 0x1f93a},
+    {0x1f93c, 0x1f93e},
+    {0x1f940, 0x1f945},
+    {0x1f947, 0x1f94c},
+    {0x1f950, 0x1f96b},
+    {0x1f980, 0x1f997},
+    {0x1f9c0, 0x1f9c0},
+    {0x1f9d0, 0x1f9e6}
 };
 
 /*
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    652,
+/**/
     651,
 /**/
     650,