summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-24 18:24:58 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-24 18:24:58 +0100
commit6a08454b93784c92296d4c08456401cbaa74c9d5 (patch)
treed13c477a413868ceea0b8d366132df7473e6126a
parent5ca84ce4aa2832041f843e624c222bbc1f4d3e14 (diff)
downloadvim-git-6a08454b93784c92296d4c08456401cbaa74c9d5.tar.gz
patch 7.4.1642v7.4.1642
Problem: Handling emoji characters as full width has problems with backwards compatibility. Solution: Only put characters in the 1f000 range in the emoji table.
-rw-r--r--runtime/tools/unicode.vim6
-rw-r--r--src/mbyte.c58
-rw-r--r--src/version.c2
3 files changed, 8 insertions, 58 deletions
diff --git a/runtime/tools/unicode.vim b/runtime/tools/unicode.vim
index e0627b644..88c4c7960 100644
--- a/runtime/tools/unicode.vim
+++ b/runtime/tools/unicode.vim
@@ -283,6 +283,12 @@ func! BuildEmojiTable(pattern, tableName)
call add(alltokens, token)
endif
+ " Characters below 1F000 may be considered single width traditionally,
+ " making them double width causes problems.
+ if first < 0x1f000
+ continue
+ endif
+
" exclude characters that are in the "ambiguous" or "doublewidth" table
for ambi in s:ambitable
if first >= ambi[0] && first <= ambi[1]
diff --git a/src/mbyte.c b/src/mbyte.c
index 811f80d9e..f38e63e77 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -1445,64 +1445,6 @@ utf_char2cells(int c)
* based on http://unicode.org/emoji/charts/emoji-list.html */
static struct interval emoji_width[] =
{
- {0x203c, 0x203c},
- {0x2049, 0x2049},
- {0x2139, 0x2139},
- {0x21a9, 0x21aa},
- {0x231a, 0x231b},
- {0x2328, 0x2328},
- {0x23cf, 0x23cf},
- {0x23e9, 0x23f3},
- {0x25aa, 0x25ab},
- {0x25fb, 0x25fe},
- {0x2600, 0x2604},
- {0x2611, 0x2611},
- {0x2618, 0x2618},
- {0x261d, 0x261d},
- {0x2620, 0x2620},
- {0x2622, 0x2623},
- {0x2626, 0x2626},
- {0x262a, 0x262a},
- {0x262e, 0x262f},
- {0x2638, 0x263a},
- {0x2648, 0x2653},
- {0x2666, 0x2666},
- {0x267b, 0x267b},
- {0x267f, 0x267f},
- {0x2692, 0x2694},
- {0x2696, 0x2697},
- {0x2699, 0x2699},
- {0x269b, 0x269c},
- {0x26a0, 0x26a1},
- {0x26aa, 0x26ab},
- {0x26b0, 0x26b1},
- {0x26bd, 0x26bd},
- {0x26ce, 0x26ce},
- {0x2702, 0x2702},
- {0x2705, 0x2705},
- {0x2708, 0x270d},
- {0x270f, 0x270f},
- {0x2712, 0x2712},
- {0x2714, 0x2714},
- {0x2716, 0x2716},
- {0x271d, 0x271d},
- {0x2721, 0x2721},
- {0x2728, 0x2728},
- {0x2733, 0x2734},
- {0x2744, 0x2744},
- {0x2747, 0x2747},
- {0x274c, 0x274c},
- {0x274e, 0x274e},
- {0x2753, 0x2755},
- {0x2763, 0x2764},
- {0x2795, 0x2797},
- {0x27a1, 0x27a1},
- {0x27b0, 0x27b0},
- {0x27bf, 0x27bf},
- {0x2934, 0x2935},
- {0x2b05, 0x2b07},
- {0x2b1b, 0x2b1c},
- {0x2b50, 0x2b50},
{0x1f004, 0x1f004},
{0x1f0cf, 0x1f0cf},
{0x1f1e6, 0x1f1ff},
diff --git a/src/version.c b/src/version.c
index 465794a0a..15b6d0dea 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1642,
+/**/
1641,
/**/
1640,