From d533edf61eef15456efdf16bf45e68c824ee5870 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 21 Sep 2016 10:15:19 -0400 Subject: vim-patch:7.4.1604 Problem: Although emoji characters are ambiguous width, best is to treat them as full width. Solution: Update the Unicode character tables. Add the 'emoji' options. (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/3848e00e0177abdb31bc600234967863ec487233 --- runtime/doc/options.txt | 21 +++++++++++++++------ runtime/optwin.vim | 2 ++ scripts/download-unicode-files.sh | 18 +++++++++++++----- scripts/genunicodetables.lua | 35 +++++++++++++++++++++++++++++++++-- src/nvim/CMakeLists.txt | 3 +++ src/nvim/mbyte.c | 3 +++ src/nvim/option.c | 2 +- src/nvim/option_defs.h | 1 + src/nvim/options.lua | 8 ++++++++ src/nvim/version.c | 2 +- 10 files changed, 80 insertions(+), 15 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 1d170c3b38..e8ddc56f7a 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.4. Last change: 2016 Apr 12 +*options.txt* For Vim version 7.4. Last change: 2016 Mar 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -899,7 +899,7 @@ A jump table for the options with a short description can be found at |Q_op|. - The backup file will be created in the first directory in the list where this is possible. The directory must exist, Vim will not create it for you. - - Empty means that no backup file will be created ( 'patchmode' is + - Empty means that no backup file will be created ('patchmode' is impossible!). Writing may fail because of this. - A directory "." means to put the backup file in the same directory as the edited file. @@ -1456,7 +1456,7 @@ A jump table for the options with a short description can be found at |Q_op|. when CTRL-P or CTRL-N are used. It is also used for whole-line completion |i_CTRL-X_CTRL-L|. It indicates the type of completion and the places to scan. It is a comma separated list of flags: - . scan the current buffer ( 'wrapscan' is ignored) + . scan the current buffer ('wrapscan' is ignored) w scan buffers from other windows b scan other loaded buffers that are in the buffer list u scan the unloaded buffers that are in the buffer list @@ -2123,6 +2123,15 @@ A jump table for the options with a short description can be found at |Q_op|. hor horizontally, height of windows is not affected both width and height of windows is affected + *'emoji'* *'emo'* +'emoji' 'emo' boolean (default: on) + global + {not in Vi} + {only available when compiled with the |+multi_byte| + feature} + When on all Unicode emoji characters are considered to be full width. + + *'encoding'* *'enc'* *E543* 'encoding' 'enc' string (default: "utf-8") global @@ -3082,7 +3091,7 @@ A jump table for the options with a short description can be found at |Q_op|. The same applies to the modeless selection. *'go-P'* 'P' Like autoselect but using the "+ register instead of the "* - register. + register. *'go-A'* 'A' Autoselect for the modeless selection. Like 'a', but only applies to the modeless selection. @@ -4378,7 +4387,7 @@ A jump table for the options with a short description can be found at |Q_op|. respectively; see |CTRL-A| for more info on these commands. alpha If included, single alphabetical characters will be incremented or decremented. This is useful for a list with a - letter index a), b), etc. *octal-nrformats* + letter index a), b), etc. *octal-nrformats* octal If included, numbers that start with a zero will be considered to be octal. Example: Using CTRL-A on "007" results in "010". hex If included, numbers starting with "0x" or "0X" will be @@ -4408,7 +4417,7 @@ A jump table for the options with a short description can be found at |Q_op|. relative to the cursor. Together with 'number' there are these four combinations (cursor in line 3): - 'nonu' 'nu' 'nonu' 'nu' + 'nonu' 'nu' 'nonu' 'nu' 'nornu' 'nornu' 'rnu' 'rnu' |apple | 1 apple | 2 apple | 2 apple diff --git a/runtime/optwin.vim b/runtime/optwin.vim index bfcf4d5294..890c183a5a 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1195,6 +1195,8 @@ if has("multi_byte") endif call append("$", "ambiwidth\twidth of ambiguous width characters") call OptionG("ambw", &ambw) + call append("$", "emoji\temoji characters are full width") + call BinOptionG("emo", &emo) endif diff --git a/scripts/download-unicode-files.sh b/scripts/download-unicode-files.sh index cb15270cf8..54fc32550c 100755 --- a/scripts/download-unicode-files.sh +++ b/scripts/download-unicode-files.sh @@ -1,11 +1,11 @@ #!/bin/sh set -e - -files="UnicodeData.txt CaseFolding.txt EastAsianWidth.txt" +data_files="UnicodeData.txt CaseFolding.txt EastAsianWidth.txt" +emoji_files="emoji-data.txt" UNIDIR_DEFAULT=unicode -DOWNLOAD_URL_BASE_DEFAULT='http://unicode.org/Public/UNIDATA' +DOWNLOAD_URL_BASE_DEFAULT='http://unicode.org/Public' if test x$1 = 'x--help' ; then echo 'Usage:' @@ -21,8 +21,16 @@ fi UNIDIR=${1:-$UNIDIR_DEFAULT} DOWNLOAD_URL_BASE=${2:-$DOWNLOAD_URL_BASE_DEFAULT} -for filename in $files ; do - curl -o "$UNIDIR/$filename" "$DOWNLOAD_URL_BASE/$filename" +for filename in $data_files ; do + curl -o "$UNIDIR/$filename" "$DOWNLOAD_URL_BASE/UNIDATA/$filename" + ( + cd "$UNIDIR" + git add $filename + ) +done + +for filename in $emoji_files ; do + curl -o "$UNIDIR/$filename" "$DOWNLOAD_URL_BASE/emoji/3.0/$filename" ( cd "$UNIDIR" git add $filename diff --git a/scripts/genunicodetables.lua b/scripts/genunicodetables.lua index 36339e2fc6..08b8b0f90e 100644 --- a/scripts/genunicodetables.lua +++ b/scripts/genunicodetables.lua @@ -12,10 +12,12 @@ -- 2 then interval applies only to first, third, fifth, … character in range. -- Fourth value is number that should be added to the codepoint to yield -- folded/lower/upper codepoint. +-- 4. emoji table: sorted list of non-overlapping closed intervals of Emoji +-- characters if arg[1] == '--help' then print('Usage:') print(' genunicodetables.lua UnicodeData.txt CaseFolding.txt ' .. - 'EastAsianWidth.txt') + 'EastAsianWidth.txt emoji-data.txt') print(' unicode_tables.generated.h') os.exit(0) end @@ -23,8 +25,9 @@ end local unicodedata_fname = arg[1] local casefolding_fname = arg[2] local eastasianwidth_fname = arg[3] +local emoji_fname = arg[4] -local utf_tables_fname = arg[4] +local utf_tables_fname = arg[5] local split_on_semicolons = function(s) local ret = {} @@ -79,6 +82,10 @@ local parse_width_props = function(eaw_fp) return fp_lines_to_lists(eaw_fp, 2, true) end +local parse_emoji_props = function(emoji_fp) + return fp_lines_to_lists(emoji_fp, 2, true) +end + local make_range = function(start, end_, step, add) if step and add then return (' {0x%x, 0x%x, %d, %d},\n'):format( @@ -213,6 +220,24 @@ local build_width_table = function(ut_fp, dataprops, widthprops, widths, ut_fp:write('};\n') end +local build_emoji_table = function(ut_fp, emojiprops) + ut_fp:write('static const struct interval emoji[] = {\n') + for _, p in ipairs(emojiprops) do + if p[2]:match('Emoji%s+#') then + local start, end_ = p[1]:find('%.%.') + if start then + local n = tonumber(p[1]:sub(1, start - 1), 16) + local nl = tonumber(p[1]:sub(end_ + 1), 16) + ut_fp:write(make_range(n, nl)) + else + local n = tonumber(p[1], 16) + ut_fp:write(make_range(n, n)) + end + end + end + ut_fp:write('};\n') +end + local ud_fp = io.open(unicodedata_fname, 'r') local dataprops = parse_data_to_props(ud_fp) ud_fp:close() @@ -236,4 +261,10 @@ eaw_fp:close() build_width_table(ut_fp, dataprops, widthprops, {W=true, F=true}, 'doublewidth') build_width_table(ut_fp, dataprops, widthprops, {A=true}, 'ambiguous') +local emoji_fp = io.open(emoji_fname, 'r') +local emojiprops = parse_emoji_props(emoji_fp) +emoji_fp:close() + +build_emoji_table(ut_fp, emojiprops) + ut_fp:close() diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 7c2c2feebc..64e99fb475 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -39,6 +39,7 @@ set(UNICODE_DIR ${PROJECT_SOURCE_DIR}/unicode) set(UNICODEDATA_FILE ${UNICODE_DIR}/UnicodeData.txt) set(CASEFOLDING_FILE ${UNICODE_DIR}/CaseFolding.txt) set(EASTASIANWIDTH_FILE ${UNICODE_DIR}/EastAsianWidth.txt) +set(EMOJI_FILE ${UNICODE_DIR}/emoji-data.txt) set(GENERATED_UNICODE_TABLES ${GENERATED_DIR}/unicode_tables.generated.h) include_directories(${GENERATED_DIR}) @@ -195,12 +196,14 @@ add_custom_command(OUTPUT ${GENERATED_UNICODE_TABLES} ${UNICODEDATA_FILE} ${CASEFOLDING_FILE} ${EASTASIANWIDTH_FILE} + ${EMOJI_FILE} ${GENERATED_UNICODE_TABLES} DEPENDS ${UNICODE_TABLES_GENERATOR} ${UNICODEDATA_FILE} ${CASEFOLDING_FILE} ${EASTASIANWIDTH_FILE} + ${EMOJI_FILE} ) add_custom_command(OUTPUT ${GENERATED_API_DISPATCH} ${API_METADATA} diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index f577fd847e..e05b3f3a37 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -949,6 +949,9 @@ int utf_char2cells(int c) if (intable(doublewidth, ARRAY_SIZE(doublewidth), c)) return 2; #endif + if (p_emoji && intable(emoji, ARRAY_SIZE(emoji), c)) { + return 2; + } } /* Characters below 0x100 are influenced by 'isprint' option */ else if (c >= 0x80 && !vim_isprintc(c)) diff --git a/src/nvim/option.c b/src/nvim/option.c index d8908cca90..acefe5b4aa 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2520,7 +2520,7 @@ did_set_string_option ( errmsg = e_invarg; } /* 'ambiwidth' */ - else if (varp == &p_ambw) { + else if (varp == &p_ambw || (bool *)varp == &p_emoji) { if (check_opt_strings(p_ambw, p_ambw_values, FALSE) != OK) errmsg = e_invarg; else if (set_chars_option(&p_lcs) != NULL) diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h index e36cceaaf4..00ab25c406 100644 --- a/src/nvim/option_defs.h +++ b/src/nvim/option_defs.h @@ -402,6 +402,7 @@ static char *(p_dy_values[]) = {"lastline", "uhex", NULL}; #define DY_LASTLINE 0x001 #define DY_UHEX 0x002 EXTERN int p_ed; /* 'edcompatible' */ +EXTERN bool p_emoji; // 'emoji' EXTERN char_u *p_ead; /* 'eadirection' */ EXTERN bool p_ea; /* 'equalalways' */ EXTERN char_u *p_ep; /* 'equalprg' */ diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 060ec8c1e1..583c63614a 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -643,6 +643,14 @@ return { varname='p_force_off', defaults={if_true={vi=false}} }, + { + full_name='emoji', abbreviation='emo', + type='bool', scope={'global'}, + vi_def=true, + redraw={'everything'}, + varname='p_emoji', + defaults={if_true={vi=true}} + }, { full_name='encoding', abbreviation='enc', type='string', scope={'global'}, diff --git a/src/nvim/version.c b/src/nvim/version.c index 685a2a843b..0106185d13 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -839,7 +839,7 @@ static int included_patches[] = { // 1607, // 1606, // 1605, - // 1604, + 1604, 1603, // 1602 NA // 1601 NA -- cgit From 49735d6fae3d99a05ff63625bb0baf10deae9c71 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 21 Sep 2016 10:46:00 -0400 Subject: Update unicode files --- unicode/emoji-data.txt | 403 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 403 insertions(+) create mode 100644 unicode/emoji-data.txt diff --git a/unicode/emoji-data.txt b/unicode/emoji-data.txt new file mode 100644 index 0000000000..731b62c4c1 --- /dev/null +++ b/unicode/emoji-data.txt @@ -0,0 +1,403 @@ +# emoji-data.txt +# Date: 2016-06-02, 09:26:10 GMT +# © 2016 Unicode®, Inc. +# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +# For terms of use, see http://www.unicode.org/terms_of_use.html +# +# Emoji Data for UTR #51 +# Version: 3.0 +# +# For documentation and usage, see http://www.unicode.org/reports/tr51 +# +# Warning: the format has changed from Version 1.0 +# Format: +# codepoint(s) ; property(=Yes) # version [count] name(s) + +# ================================================ + +# All omitted code points have Emoji=No +# @missing: 0000..10FFFF ; Emoji ; No + +0023 ; Emoji # 1.1 [1] (#) NUMBER SIGN +002A ; Emoji # 1.1 [1] (*) ASTERISK +0030..0039 ; Emoji # 1.1 [10] (0..9) DIGIT ZERO..DIGIT NINE +00A9 ; Emoji # 1.1 [1] (©) COPYRIGHT SIGN +00AE ; Emoji # 1.1 [1] (®) REGISTERED SIGN +203C ; Emoji # 1.1 [1] (‼) DOUBLE EXCLAMATION MARK +2049 ; Emoji # 3.0 [1] (⁉) EXCLAMATION QUESTION MARK +2122 ; Emoji # 1.1 [1] (™) TRADE MARK SIGN +2139 ; Emoji # 3.0 [1] (ℹ) INFORMATION SOURCE +2194..2199 ; Emoji # 1.1 [6] (↔..↙) LEFT RIGHT ARROW..SOUTH WEST ARROW +21A9..21AA ; Emoji # 1.1 [2] (↩..↪) LEFTWARDS ARROW WITH HOOK..RIGHTWARDS ARROW WITH HOOK +231A..231B ; Emoji # 1.1 [2] (⌚..⌛) WATCH..HOURGLASS +2328 ; Emoji # 1.1 [1] (⌨) KEYBOARD +23CF ; Emoji # 4.0 [1] (⏏) EJECT SYMBOL +23E9..23F3 ; Emoji # 6.0 [11] (⏩..⏳) BLACK RIGHT-POINTING DOUBLE TRIANGLE..HOURGLASS WITH FLOWING SAND +23F8..23FA ; Emoji # 7.0 [3] (⏸..⏺) DOUBLE VERTICAL BAR..BLACK CIRCLE FOR RECORD +24C2 ; Emoji # 1.1 [1] (Ⓜ) CIRCLED LATIN CAPITAL LETTER M +25AA..25AB ; Emoji # 1.1 [2] (▪..▫) BLACK SMALL SQUARE..WHITE SMALL SQUARE +25B6 ; Emoji # 1.1 [1] (▶) BLACK RIGHT-POINTING TRIANGLE +25C0 ; Emoji # 1.1 [1] (◀) BLACK LEFT-POINTING TRIANGLE +25FB..25FE ; Emoji # 3.2 [4] (◻..◾) WHITE MEDIUM SQUARE..BLACK MEDIUM SMALL SQUARE +2600..2604 ; Emoji # 1.1 [5] (☀..☄) BLACK SUN WITH RAYS..COMET +260E ; Emoji # 1.1 [1] (☎) BLACK TELEPHONE +2611 ; Emoji # 1.1 [1] (☑) BALLOT BOX WITH CHECK +2614..2615 ; Emoji # 4.0 [2] (☔..☕) UMBRELLA WITH RAIN DROPS..HOT BEVERAGE +2618 ; Emoji # 4.1 [1] (☘) SHAMROCK +261D ; Emoji # 1.1 [1] (☝) WHITE UP POINTING INDEX +2620 ; Emoji # 1.1 [1] (☠) SKULL AND CROSSBONES +2622..2623 ; Emoji # 1.1 [2] (☢..☣) RADIOACTIVE SIGN..BIOHAZARD SIGN +2626 ; Emoji # 1.1 [1] (☦) ORTHODOX CROSS +262A ; Emoji # 1.1 [1] (☪) STAR AND CRESCENT +262E..262F ; Emoji # 1.1 [2] (☮..☯) PEACE SYMBOL..YIN YANG +2638..263A ; Emoji # 1.1 [3] (☸..☺) WHEEL OF DHARMA..WHITE SMILING FACE +2648..2653 ; Emoji # 1.1 [12] (♈..♓) ARIES..PISCES +2660 ; Emoji # 1.1 [1] (♠) BLACK SPADE SUIT +2663 ; Emoji # 1.1 [1] (♣) BLACK CLUB SUIT +2665..2666 ; Emoji # 1.1 [2] (♥..♦) BLACK HEART SUIT..BLACK DIAMOND SUIT +2668 ; Emoji # 1.1 [1] (♨) HOT SPRINGS +267B ; Emoji # 3.2 [1] (♻) BLACK UNIVERSAL RECYCLING SYMBOL +267F ; Emoji # 4.1 [1] (♿) WHEELCHAIR SYMBOL +2692..2694 ; Emoji # 4.1 [3] (⚒..⚔) HAMMER AND PICK..CROSSED SWORDS +2696..2697 ; Emoji # 4.1 [2] (⚖..⚗) SCALES..ALEMBIC +2699 ; Emoji # 4.1 [1] (⚙) GEAR +269B..269C ; Emoji # 4.1 [2] (⚛..⚜) ATOM SYMBOL..FLEUR-DE-LIS +26A0..26A1 ; Emoji # 4.0 [2] (⚠..⚡) WARNING SIGN..HIGH VOLTAGE SIGN +26AA..26AB ; Emoji # 4.1 [2] (⚪..⚫) MEDIUM WHITE CIRCLE..MEDIUM BLACK CIRCLE +26B0..26B1 ; Emoji # 4.1 [2] (⚰..⚱) COFFIN..FUNERAL URN +26BD..26BE ; Emoji # 5.2 [2] (⚽..⚾) SOCCER BALL..BASEBALL +26C4..26C5 ; Emoji # 5.2 [2] (⛄..⛅) SNOWMAN WITHOUT SNOW..SUN BEHIND CLOUD +26C8 ; Emoji # 5.2 [1] (⛈) THUNDER CLOUD AND RAIN +26CE ; Emoji # 6.0 [1] (⛎) OPHIUCHUS +26CF ; Emoji # 5.2 [1] (⛏) PICK +26D1 ; Emoji # 5.2 [1] (⛑) HELMET WITH WHITE CROSS +26D3..26D4 ; Emoji # 5.2 [2] (⛓..⛔) CHAINS..NO ENTRY +26E9..26EA ; Emoji # 5.2 [2] (⛩..⛪) SHINTO SHRINE..CHURCH +26F0..26F5 ; Emoji # 5.2 [6] (⛰..⛵) MOUNTAIN..SAILBOAT +26F7..26FA ; Emoji # 5.2 [4] (⛷..⛺) SKIER..TENT +26FD ; Emoji # 5.2 [1] (⛽) FUEL PUMP +2702 ; Emoji # 1.1 [1] (✂) BLACK SCISSORS +2705 ; Emoji # 6.0 [1] (✅) WHITE HEAVY CHECK MARK +2708..2709 ; Emoji # 1.1 [2] (✈..✉) AIRPLANE..ENVELOPE +270A..270B ; Emoji # 6.0 [2] (✊..✋) RAISED FIST..RAISED HAND +270C..270D ; Emoji # 1.1 [2] (✌..✍) VICTORY HAND..WRITING HAND +270F ; Emoji # 1.1 [1] (✏) PENCIL +2712 ; Emoji # 1.1 [1] (✒) BLACK NIB +2714 ; Emoji # 1.1 [1] (✔) HEAVY CHECK MARK +2716 ; Emoji # 1.1 [1] (✖) HEAVY MULTIPLICATION X +271D ; Emoji # 1.1 [1] (✝) LATIN CROSS +2721 ; Emoji # 1.1 [1] (✡) STAR OF DAVID +2728 ; Emoji # 6.0 [1] (✨) SPARKLES +2733..2734 ; Emoji # 1.1 [2] (✳..✴) EIGHT SPOKED ASTERISK..EIGHT POINTED BLACK STAR +2744 ; Emoji # 1.1 [1] (❄) SNOWFLAKE +2747 ; Emoji # 1.1 [1] (❇) SPARKLE +274C ; Emoji # 6.0 [1] (❌) CROSS MARK +274E ; Emoji # 6.0 [1] (❎) NEGATIVE SQUARED CROSS MARK +2753..2755 ; Emoji # 6.0 [3] (❓..❕) BLACK QUESTION MARK ORNAMENT..WHITE EXCLAMATION MARK ORNAMENT +2757 ; Emoji # 5.2 [1] (❗) HEAVY EXCLAMATION MARK SYMBOL +2763..2764 ; Emoji # 1.1 [2] (❣..❤) HEAVY HEART EXCLAMATION MARK ORNAMENT..HEAVY BLACK HEART +2795..2797 ; Emoji # 6.0 [3] (➕..➗) HEAVY PLUS SIGN..HEAVY DIVISION SIGN +27A1 ; Emoji # 1.1 [1] (➡) BLACK RIGHTWARDS ARROW +27B0 ; Emoji # 6.0 [1] (➰) CURLY LOOP +27BF ; Emoji # 6.0 [1] (➿) DOUBLE CURLY LOOP +2934..2935 ; Emoji # 3.2 [2] (⤴..⤵) ARROW POINTING RIGHTWARDS THEN CURVING UPWARDS..ARROW POINTING RIGHTWARDS THEN CURVING DOWNWARDS +2B05..2B07 ; Emoji # 4.0 [3] (⬅..⬇) LEFTWARDS BLACK ARROW..DOWNWARDS BLACK ARROW +2B1B..2B1C ; Emoji # 5.1 [2] (⬛..⬜) BLACK LARGE SQUARE..WHITE LARGE SQUARE +2B50 ; Emoji # 5.1 [1] (⭐) WHITE MEDIUM STAR +2B55 ; Emoji # 5.2 [1] (⭕) HEAVY LARGE CIRCLE +3030 ; Emoji # 1.1 [1] (〰) WAVY DASH +303D ; Emoji # 3.2 [1] (〽) PART ALTERNATION MARK +3297 ; Emoji # 1.1 [1] (㊗) CIRCLED IDEOGRAPH CONGRATULATION +3299 ; Emoji # 1.1 [1] (㊙) CIRCLED IDEOGRAPH SECRET +1F004 ; Emoji # 5.1 [1] (🀄) MAHJONG TILE RED DRAGON +1F0CF ; Emoji # 6.0 [1] (🃏) PLAYING CARD BLACK JOKER +1F170..1F171 ; Emoji # 6.0 [2] (🅰..🅱) NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED LATIN CAPITAL LETTER B +1F17E ; Emoji # 6.0 [1] (🅾) NEGATIVE SQUARED LATIN CAPITAL LETTER O +1F17F ; Emoji # 5.2 [1] (🅿) NEGATIVE SQUARED LATIN CAPITAL LETTER P +1F18E ; Emoji # 6.0 [1] (🆎) NEGATIVE SQUARED AB +1F191..1F19A ; Emoji # 6.0 [10] (🆑..🆚) SQUARED CL..SQUARED VS +1F1E6..1F1FF ; Emoji # 6.0 [26] (🇦..🇿) REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z +1F201..1F202 ; Emoji # 6.0 [2] (🈁..🈂) SQUARED KATAKANA KOKO..SQUARED KATAKANA SA +1F21A ; Emoji # 5.2 [1] (🈚) SQUARED CJK UNIFIED IDEOGRAPH-7121 +1F22F ; Emoji # 5.2 [1] (🈯) SQUARED CJK UNIFIED IDEOGRAPH-6307 +1F232..1F23A ; Emoji # 6.0 [9] (🈲..🈺) SQUARED CJK UNIFIED IDEOGRAPH-7981..SQUARED CJK UNIFIED IDEOGRAPH-55B6 +1F250..1F251 ; Emoji # 6.0 [2] (🉐..🉑) CIRCLED IDEOGRAPH ADVANTAGE..CIRCLED IDEOGRAPH ACCEPT +1F300..1F320 ; Emoji # 6.0 [33] (🌀..🌠) CYCLONE..SHOOTING STAR +1F321 ; Emoji # 7.0 [1] (🌡) THERMOMETER +1F324..1F32C ; Emoji # 7.0 [9] (🌤..🌬) WHITE SUN WITH SMALL CLOUD..WIND BLOWING FACE +1F32D..1F32F ; Emoji # 8.0 [3] (🌭..🌯) HOT DOG..BURRITO +1F330..1F335 ; Emoji # 6.0 [6] (🌰..🌵) CHESTNUT..CACTUS +1F336 ; Emoji # 7.0 [1] (🌶) HOT PEPPER +1F337..1F37C ; Emoji # 6.0 [70] (🌷..🍼) TULIP..BABY BOTTLE +1F37D ; Emoji # 7.0 [1] (🍽) FORK AND KNIFE WITH PLATE +1F37E..1F37F ; Emoji # 8.0 [2] (🍾..🍿) BOTTLE WITH POPPING CORK..POPCORN +1F380..1F393 ; Emoji # 6.0 [20] (🎀..🎓) RIBBON..GRADUATION CAP +1F396..1F397 ; Emoji # 7.0 [2] (🎖..🎗) MILITARY MEDAL..REMINDER RIBBON +1F399..1F39B ; Emoji # 7.0 [3] (🎙..🎛) STUDIO MICROPHONE..CONTROL KNOBS +1F39E..1F39F ; Emoji # 7.0 [2] (🎞..🎟) FILM FRAMES..ADMISSION TICKETS +1F3A0..1F3C4 ; Emoji # 6.0 [37] (🎠..🏄) CAROUSEL HORSE..SURFER +1F3C5 ; Emoji # 7.0 [1] (🏅) SPORTS MEDAL +1F3C6..1F3CA ; Emoji # 6.0 [5] (🏆..🏊) TROPHY..SWIMMER +1F3CB..1F3CE ; Emoji # 7.0 [4] (🏋..🏎) WEIGHT LIFTER..RACING CAR +1F3CF..1F3D3 ; Emoji # 8.0 [5] (🏏..🏓) CRICKET BAT AND BALL..TABLE TENNIS PADDLE AND BALL +1F3D4..1F3DF ; Emoji # 7.0 [12] (🏔..🏟) SNOW CAPPED MOUNTAIN..STADIUM +1F3E0..1F3F0 ; Emoji # 6.0 [17] (🏠..🏰) HOUSE BUILDING..EUROPEAN CASTLE +1F3F3..1F3F5 ; Emoji # 7.0 [3] (🏳..🏵) WAVING WHITE FLAG..ROSETTE +1F3F7 ; Emoji # 7.0 [1] (🏷) LABEL +1F3F8..1F3FF ; Emoji # 8.0 [8] (🏸..🏿) BADMINTON RACQUET AND SHUTTLECOCK..EMOJI MODIFIER FITZPATRICK TYPE-6 +1F400..1F43E ; Emoji # 6.0 [63] (🐀..🐾) RAT..PAW PRINTS +1F43F ; Emoji # 7.0 [1] (🐿) CHIPMUNK +1F440 ; Emoji # 6.0 [1] (👀) EYES +1F441 ; Emoji # 7.0 [1] (👁) EYE +1F442..1F4F7 ; Emoji # 6.0[182] (👂..📷) EAR..CAMERA +1F4F8 ; Emoji # 7.0 [1] (📸) CAMERA WITH FLASH +1F4F9..1F4FC ; Emoji # 6.0 [4] (📹..📼) VIDEO CAMERA..VIDEOCASSETTE +1F4FD ; Emoji # 7.0 [1] (📽) FILM PROJECTOR +1F4FF ; Emoji # 8.0 [1] (📿) PRAYER BEADS +1F500..1F53D ; Emoji # 6.0 [62] (🔀..🔽) TWISTED RIGHTWARDS ARROWS..DOWN-POINTING SMALL RED TRIANGLE +1F549..1F54A ; Emoji # 7.0 [2] (🕉..🕊) OM SYMBOL..DOVE OF PEACE +1F54B..1F54E ; Emoji # 8.0 [4] (🕋..🕎) KAABA..MENORAH WITH NINE BRANCHES +1F550..1F567 ; Emoji # 6.0 [24] (🕐..🕧) CLOCK FACE ONE OCLOCK..CLOCK FACE TWELVE-THIRTY +1F56F..1F570 ; Emoji # 7.0 [2] (🕯..🕰) CANDLE..MANTELPIECE CLOCK +1F573..1F579 ; Emoji # 7.0 [7] (🕳..🕹) HOLE..JOYSTICK +1F57A ; Emoji # 9.0 [1] (🕺) MAN DANCING +1F587 ; Emoji # 7.0 [1] (🖇) LINKED PAPERCLIPS +1F58A..1F58D ; Emoji # 7.0 [4] (🖊..🖍) LOWER LEFT BALLPOINT PEN..LOWER LEFT CRAYON +1F590 ; Emoji # 7.0 [1] (🖐) RAISED HAND WITH FINGERS SPLAYED +1F595..1F596 ; Emoji # 7.0 [2] (🖕..🖖) REVERSED HAND WITH MIDDLE FINGER EXTENDED..RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS +1F5A4 ; Emoji # 9.0 [1] (🖤) BLACK HEART +1F5A5 ; Emoji # 7.0 [1] (🖥) DESKTOP COMPUTER +1F5A8 ; Emoji # 7.0 [1] (🖨) PRINTER +1F5B1..1F5B2 ; Emoji # 7.0 [2] (🖱..🖲) THREE BUTTON MOUSE..TRACKBALL +1F5BC ; Emoji # 7.0 [1] (🖼) FRAME WITH PICTURE +1F5C2..1F5C4 ; Emoji # 7.0 [3] (🗂..🗄) CARD INDEX DIVIDERS..FILE CABINET +1F5D1..1F5D3 ; Emoji # 7.0 [3] (🗑..🗓) WASTEBASKET..SPIRAL CALENDAR PAD +1F5DC..1F5DE ; Emoji # 7.0 [3] (🗜..🗞) COMPRESSION..ROLLED-UP NEWSPAPER +1F5E1 ; Emoji # 7.0 [1] (🗡) DAGGER KNIFE +1F5E3 ; Emoji # 7.0 [1] (🗣) SPEAKING HEAD IN SILHOUETTE +1F5E8 ; Emoji # 7.0 [1] (🗨) LEFT SPEECH BUBBLE +1F5EF ; Emoji # 7.0 [1] (🗯) RIGHT ANGER BUBBLE +1F5F3 ; Emoji # 7.0 [1] (🗳) BALLOT BOX WITH BALLOT +1F5FA ; Emoji # 7.0 [1] (🗺) WORLD MAP +1F5FB..1F5FF ; Emoji # 6.0 [5] (🗻..🗿) MOUNT FUJI..MOYAI +1F600 ; Emoji # 6.1 [1] (😀) GRINNING FACE +1F601..1F610 ; Emoji # 6.0 [16] (😁..😐) GRINNING FACE WITH SMILING EYES..NEUTRAL FACE +1F611 ; Emoji # 6.1 [1] (😑) EXPRESSIONLESS FACE +1F612..1F614 ; Emoji # 6.0 [3] (😒..😔) UNAMUSED FACE..PENSIVE FACE +1F615 ; Emoji # 6.1 [1] (😕) CONFUSED FACE +1F616 ; Emoji # 6.0 [1] (😖) CONFOUNDED FACE +1F617 ; Emoji # 6.1 [1] (😗) KISSING FACE +1F618 ; Emoji # 6.0 [1] (😘) FACE THROWING A KISS +1F619 ; Emoji # 6.1 [1] (😙) KISSING FACE WITH SMILING EYES +1F61A ; Emoji # 6.0 [1] (😚) KISSING FACE WITH CLOSED EYES +1F61B ; Emoji # 6.1 [1] (😛) FACE WITH STUCK-OUT TONGUE +1F61C..1F61E ; Emoji # 6.0 [3] (😜..😞) FACE WITH STUCK-OUT TONGUE AND WINKING EYE..DISAPPOINTED FACE +1F61F ; Emoji # 6.1 [1] (😟) WORRIED FACE +1F620..1F625 ; Emoji # 6.0 [6] (😠..😥) ANGRY FACE..DISAPPOINTED BUT RELIEVED FACE +1F626..1F627 ; Emoji # 6.1 [2] (😦..😧) FROWNING FACE WITH OPEN MOUTH..ANGUISHED FACE +1F628..1F62B ; Emoji # 6.0 [4] (😨..😫) FEARFUL FACE..TIRED FACE +1F62C ; Emoji # 6.1 [1] (😬) GRIMACING FACE +1F62D ; Emoji # 6.0 [1] (😭) LOUDLY CRYING FACE +1F62E..1F62F ; Emoji # 6.1 [2] (😮..😯) FACE WITH OPEN MOUTH..HUSHED FACE +1F630..1F633 ; Emoji # 6.0 [4] (😰..😳) FACE WITH OPEN MOUTH AND COLD SWEAT..FLUSHED FACE +1F634 ; Emoji # 6.1 [1] (😴) SLEEPING FACE +1F635..1F640 ; Emoji # 6.0 [12] (😵..🙀) DIZZY FACE..WEARY CAT FACE +1F641..1F642 ; Emoji # 7.0 [2] (🙁..🙂) SLIGHTLY FROWNING FACE..SLIGHTLY SMILING FACE +1F643..1F644 ; Emoji # 8.0 [2] (🙃..🙄) UPSIDE-DOWN FACE..FACE WITH ROLLING EYES +1F645..1F64F ; Emoji # 6.0 [11] (🙅..🙏) FACE WITH NO GOOD GESTURE..PERSON WITH FOLDED HANDS +1F680..1F6C5 ; Emoji # 6.0 [70] (🚀..🛅) ROCKET..LEFT LUGGAGE +1F6CB..1F6CF ; Emoji # 7.0 [5] (🛋..🛏) COUCH AND LAMP..BED +1F6D0 ; Emoji # 8.0 [1] (🛐) PLACE OF WORSHIP +1F6D1..1F6D2 ; Emoji # 9.0 [2] (🛑..🛒) OCTAGONAL SIGN..SHOPPING TROLLEY +1F6E0..1F6E5 ; Emoji # 7.0 [6] (🛠..🛥) HAMMER AND WRENCH..MOTOR BOAT +1F6E9 ; Emoji # 7.0 [1] (🛩) SMALL AIRPLANE +1F6EB..1F6EC ; Emoji # 7.0 [2] (🛫..🛬) AIRPLANE DEPARTURE..AIRPLANE ARRIVING +1F6F0 ; Emoji # 7.0 [1] (🛰) SATELLITE +1F6F3 ; Emoji # 7.0 [1] (🛳) PASSENGER SHIP +1F6F4..1F6F6 ; Emoji # 9.0 [3] (🛴..🛶) SCOOTER..CANOE +1F910..1F918 ; Emoji # 8.0 [9] (🤐..🤘) ZIPPER-MOUTH FACE..SIGN OF THE HORNS +1F919..1F91E ; Emoji # 9.0 [6] (🤙..🤞) CALL ME HAND..HAND WITH INDEX AND MIDDLE FINGERS CROSSED +1F920..1F927 ; Emoji # 9.0 [8] (🤠..🤧) FACE WITH COWBOY HAT..SNEEZING FACE +1F930 ; Emoji # 9.0 [1] (🤰) PREGNANT WOMAN +1F933..1F93A ; Emoji # 9.0 [8] (🤳..🤺) SELFIE..FENCER +1F93C..1F93E ; Emoji # 9.0 [3] (🤼..🤾) WRESTLERS..HANDBALL +1F940..1F945 ; Emoji # 9.0 [6] (🥀..🥅) WILTED FLOWER..GOAL NET +1F947..1F94B ; Emoji # 9.0 [5] (🥇..🥋) FIRST PLACE MEDAL..MARTIAL ARTS UNIFORM +1F950..1F95E ; Emoji # 9.0 [15] (🥐..🥞) CROISSANT..PANCAKES +1F980..1F984 ; Emoji # 8.0 [5] (🦀..🦄) CRAB..UNICORN FACE +1F985..1F991 ; Emoji # 9.0 [13] (🦅..🦑) EAGLE..SQUID +1F9C0 ; Emoji # 8.0 [1] (🧀) CHEESE WEDGE + +# Total elements: 1123 + +# ================================================ + +# All omitted code points have Emoji_Presentation=No +# @missing: 0000..10FFFF ; Emoji_Presentation ; No + +231A..231B ; Emoji_Presentation # 1.1 [2] (⌚..⌛) WATCH..HOURGLASS +23E9..23EC ; Emoji_Presentation # 6.0 [4] (⏩..⏬) BLACK RIGHT-POINTING DOUBLE TRIANGLE..BLACK DOWN-POINTING DOUBLE TRIANGLE +23F0 ; Emoji_Presentation # 6.0 [1] (⏰) ALARM CLOCK +23F3 ; Emoji_Presentation # 6.0 [1] (⏳) HOURGLASS WITH FLOWING SAND +25FD..25FE ; Emoji_Presentation # 3.2 [2] (◽..◾) WHITE MEDIUM SMALL SQUARE..BLACK MEDIUM SMALL SQUARE +2614..2615 ; Emoji_Presentation # 4.0 [2] (☔..☕) UMBRELLA WITH RAIN DROPS..HOT BEVERAGE +2648..2653 ; Emoji_Presentation # 1.1 [12] (♈..♓) ARIES..PISCES +267F ; Emoji_Presentation # 4.1 [1] (♿) WHEELCHAIR SYMBOL +2693 ; Emoji_Presentation # 4.1 [1] (⚓) ANCHOR +26A1 ; Emoji_Presentation # 4.0 [1] (⚡) HIGH VOLTAGE SIGN +26AA..26AB ; Emoji_Presentation # 4.1 [2] (⚪..⚫) MEDIUM WHITE CIRCLE..MEDIUM BLACK CIRCLE +26BD..26BE ; Emoji_Presentation # 5.2 [2] (⚽..⚾) SOCCER BALL..BASEBALL +26C4..26C5 ; Emoji_Presentation # 5.2 [2] (⛄..⛅) SNOWMAN WITHOUT SNOW..SUN BEHIND CLOUD +26CE ; Emoji_Presentation # 6.0 [1] (⛎) OPHIUCHUS +26D4 ; Emoji_Presentation # 5.2 [1] (⛔) NO ENTRY +26EA ; Emoji_Presentation # 5.2 [1] (⛪) CHURCH +26F2..26F3 ; Emoji_Presentation # 5.2 [2] (⛲..⛳) FOUNTAIN..FLAG IN HOLE +26F5 ; Emoji_Presentation # 5.2 [1] (⛵) SAILBOAT +26FA ; Emoji_Presentation # 5.2 [1] (⛺) TENT +26FD ; Emoji_Presentation # 5.2 [1] (⛽) FUEL PUMP +2705 ; Emoji_Presentation # 6.0 [1] (✅) WHITE HEAVY CHECK MARK +270A..270B ; Emoji_Presentation # 6.0 [2] (✊..✋) RAISED FIST..RAISED HAND +2728 ; Emoji_Presentation # 6.0 [1] (✨) SPARKLES +274C ; Emoji_Presentation # 6.0 [1] (❌) CROSS MARK +274E ; Emoji_Presentation # 6.0 [1] (❎) NEGATIVE SQUARED CROSS MARK +2753..2755 ; Emoji_Presentation # 6.0 [3] (❓..❕) BLACK QUESTION MARK ORNAMENT..WHITE EXCLAMATION MARK ORNAMENT +2757 ; Emoji_Presentation # 5.2 [1] (❗) HEAVY EXCLAMATION MARK SYMBOL +2795..2797 ; Emoji_Presentation # 6.0 [3] (➕..➗) HEAVY PLUS SIGN..HEAVY DIVISION SIGN +27B0 ; Emoji_Presentation # 6.0 [1] (➰) CURLY LOOP +27BF ; Emoji_Presentation # 6.0 [1] (➿) DOUBLE CURLY LOOP +2B1B..2B1C ; Emoji_Presentation # 5.1 [2] (⬛..⬜) BLACK LARGE SQUARE..WHITE LARGE SQUARE +2B50 ; Emoji_Presentation # 5.1 [1] (⭐) WHITE MEDIUM STAR +2B55 ; Emoji_Presentation # 5.2 [1] (⭕) HEAVY LARGE CIRCLE +1F004 ; Emoji_Presentation # 5.1 [1] (🀄) MAHJONG TILE RED DRAGON +1F0CF ; Emoji_Presentation # 6.0 [1] (🃏) PLAYING CARD BLACK JOKER +1F18E ; Emoji_Presentation # 6.0 [1] (🆎) NEGATIVE SQUARED AB +1F191..1F19A ; Emoji_Presentation # 6.0 [10] (🆑..🆚) SQUARED CL..SQUARED VS +1F1E6..1F1FF ; Emoji_Presentation # 6.0 [26] (🇦..🇿) REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z +1F201 ; Emoji_Presentation # 6.0 [1] (🈁) SQUARED KATAKANA KOKO +1F21A ; Emoji_Presentation # 5.2 [1] (🈚) SQUARED CJK UNIFIED IDEOGRAPH-7121 +1F22F ; Emoji_Presentation # 5.2 [1] (🈯) SQUARED CJK UNIFIED IDEOGRAPH-6307 +1F232..1F236 ; Emoji_Presentation # 6.0 [5] (🈲..🈶) SQUARED CJK UNIFIED IDEOGRAPH-7981..SQUARED CJK UNIFIED IDEOGRAPH-6709 +1F238..1F23A ; Emoji_Presentation # 6.0 [3] (🈸..🈺) SQUARED CJK UNIFIED IDEOGRAPH-7533..SQUARED CJK UNIFIED IDEOGRAPH-55B6 +1F250..1F251 ; Emoji_Presentation # 6.0 [2] (🉐..🉑) CIRCLED IDEOGRAPH ADVANTAGE..CIRCLED IDEOGRAPH ACCEPT +1F300..1F320 ; Emoji_Presentation # 6.0 [33] (🌀..🌠) CYCLONE..SHOOTING STAR +1F32D..1F32F ; Emoji_Presentation # 8.0 [3] (🌭..🌯) HOT DOG..BURRITO +1F330..1F335 ; Emoji_Presentation # 6.0 [6] (🌰..🌵) CHESTNUT..CACTUS +1F337..1F37C ; Emoji_Presentation # 6.0 [70] (🌷..🍼) TULIP..BABY BOTTLE +1F37E..1F37F ; Emoji_Presentation # 8.0 [2] (🍾..🍿) BOTTLE WITH POPPING CORK..POPCORN +1F380..1F393 ; Emoji_Presentation # 6.0 [20] (🎀..🎓) RIBBON..GRADUATION CAP +1F3A0..1F3C4 ; Emoji_Presentation # 6.0 [37] (🎠..🏄) CAROUSEL HORSE..SURFER +1F3C5 ; Emoji_Presentation # 7.0 [1] (🏅) SPORTS MEDAL +1F3C6..1F3CA ; Emoji_Presentation # 6.0 [5] (🏆..🏊) TROPHY..SWIMMER +1F3CF..1F3D3 ; Emoji_Presentation # 8.0 [5] (🏏..🏓) CRICKET BAT AND BALL..TABLE TENNIS PADDLE AND BALL +1F3E0..1F3F0 ; Emoji_Presentation # 6.0 [17] (🏠..🏰) HOUSE BUILDING..EUROPEAN CASTLE +1F3F4 ; Emoji_Presentation # 7.0 [1] (🏴) WAVING BLACK FLAG +1F3F8..1F3FF ; Emoji_Presentation # 8.0 [8] (🏸..🏿) BADMINTON RACQUET AND SHUTTLECOCK..EMOJI MODIFIER FITZPATRICK TYPE-6 +1F400..1F43E ; Emoji_Presentation # 6.0 [63] (🐀..🐾) RAT..PAW PRINTS +1F440 ; Emoji_Presentation # 6.0 [1] (👀) EYES +1F442..1F4F7 ; Emoji_Presentation # 6.0[182] (👂..📷) EAR..CAMERA +1F4F8 ; Emoji_Presentation # 7.0 [1] (📸) CAMERA WITH FLASH +1F4F9..1F4FC ; Emoji_Presentation # 6.0 [4] (📹..📼) VIDEO CAMERA..VIDEOCASSETTE +1F4FF ; Emoji_Presentation # 8.0 [1] (📿) PRAYER BEADS +1F500..1F53D ; Emoji_Presentation # 6.0 [62] (🔀..🔽) TWISTED RIGHTWARDS ARROWS..DOWN-POINTING SMALL RED TRIANGLE +1F54B..1F54E ; Emoji_Presentation # 8.0 [4] (🕋..🕎) KAABA..MENORAH WITH NINE BRANCHES +1F550..1F567 ; Emoji_Presentation # 6.0 [24] (🕐..🕧) CLOCK FACE ONE OCLOCK..CLOCK FACE TWELVE-THIRTY +1F57A ; Emoji_Presentation # 9.0 [1] (🕺) MAN DANCING +1F595..1F596 ; Emoji_Presentation # 7.0 [2] (🖕..🖖) REVERSED HAND WITH MIDDLE FINGER EXTENDED..RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS +1F5A4 ; Emoji_Presentation # 9.0 [1] (🖤) BLACK HEART +1F5FB..1F5FF ; Emoji_Presentation # 6.0 [5] (🗻..🗿) MOUNT FUJI..MOYAI +1F600 ; Emoji_Presentation # 6.1 [1] (😀) GRINNING FACE +1F601..1F610 ; Emoji_Presentation # 6.0 [16] (😁..😐) GRINNING FACE WITH SMILING EYES..NEUTRAL FACE +1F611 ; Emoji_Presentation # 6.1 [1] (😑) EXPRESSIONLESS FACE +1F612..1F614 ; Emoji_Presentation # 6.0 [3] (😒..😔) UNAMUSED FACE..PENSIVE FACE +1F615 ; Emoji_Presentation # 6.1 [1] (😕) CONFUSED FACE +1F616 ; Emoji_Presentation # 6.0 [1] (😖) CONFOUNDED FACE +1F617 ; Emoji_Presentation # 6.1 [1] (😗) KISSING FACE +1F618 ; Emoji_Presentation # 6.0 [1] (😘) FACE THROWING A KISS +1F619 ; Emoji_Presentation # 6.1 [1] (😙) KISSING FACE WITH SMILING EYES +1F61A ; Emoji_Presentation # 6.0 [1] (😚) KISSING FACE WITH CLOSED EYES +1F61B ; Emoji_Presentation # 6.1 [1] (😛) FACE WITH STUCK-OUT TONGUE +1F61C..1F61E ; Emoji_Presentation # 6.0 [3] (😜..😞) FACE WITH STUCK-OUT TONGUE AND WINKING EYE..DISAPPOINTED FACE +1F61F ; Emoji_Presentation # 6.1 [1] (😟) WORRIED FACE +1F620..1F625 ; Emoji_Presentation # 6.0 [6] (😠..😥) ANGRY FACE..DISAPPOINTED BUT RELIEVED FACE +1F626..1F627 ; Emoji_Presentation # 6.1 [2] (😦..😧) FROWNING FACE WITH OPEN MOUTH..ANGUISHED FACE +1F628..1F62B ; Emoji_Presentation # 6.0 [4] (😨..😫) FEARFUL FACE..TIRED FACE +1F62C ; Emoji_Presentation # 6.1 [1] (😬) GRIMACING FACE +1F62D ; Emoji_Presentation # 6.0 [1] (😭) LOUDLY CRYING FACE +1F62E..1F62F ; Emoji_Presentation # 6.1 [2] (😮..😯) FACE WITH OPEN MOUTH..HUSHED FACE +1F630..1F633 ; Emoji_Presentation # 6.0 [4] (😰..😳) FACE WITH OPEN MOUTH AND COLD SWEAT..FLUSHED FACE +1F634 ; Emoji_Presentation # 6.1 [1] (😴) SLEEPING FACE +1F635..1F640 ; Emoji_Presentation # 6.0 [12] (😵..🙀) DIZZY FACE..WEARY CAT FACE +1F641..1F642 ; Emoji_Presentation # 7.0 [2] (🙁..🙂) SLIGHTLY FROWNING FACE..SLIGHTLY SMILING FACE +1F643..1F644 ; Emoji_Presentation # 8.0 [2] (🙃..🙄) UPSIDE-DOWN FACE..FACE WITH ROLLING EYES +1F645..1F64F ; Emoji_Presentation # 6.0 [11] (🙅..🙏) FACE WITH NO GOOD GESTURE..PERSON WITH FOLDED HANDS +1F680..1F6C5 ; Emoji_Presentation # 6.0 [70] (🚀..🛅) ROCKET..LEFT LUGGAGE +1F6CC ; Emoji_Presentation # 7.0 [1] (🛌) SLEEPING ACCOMMODATION +1F6D0 ; Emoji_Presentation # 8.0 [1] (🛐) PLACE OF WORSHIP +1F6D1..1F6D2 ; Emoji_Presentation # 9.0 [2] (🛑..🛒) OCTAGONAL SIGN..SHOPPING TROLLEY +1F6EB..1F6EC ; Emoji_Presentation # 7.0 [2] (🛫..🛬) AIRPLANE DEPARTURE..AIRPLANE ARRIVING +1F6F4..1F6F6 ; Emoji_Presentation # 9.0 [3] (🛴..🛶) SCOOTER..CANOE +1F910..1F918 ; Emoji_Presentation # 8.0 [9] (🤐..🤘) ZIPPER-MOUTH FACE..SIGN OF THE HORNS +1F919..1F91E ; Emoji_Presentation # 9.0 [6] (🤙..🤞) CALL ME HAND..HAND WITH INDEX AND MIDDLE FINGERS CROSSED +1F920..1F927 ; Emoji_Presentation # 9.0 [8] (🤠..🤧) FACE WITH COWBOY HAT..SNEEZING FACE +1F930 ; Emoji_Presentation # 9.0 [1] (🤰) PREGNANT WOMAN +1F933..1F93A ; Emoji_Presentation # 9.0 [8] (🤳..🤺) SELFIE..FENCER +1F93C..1F93E ; Emoji_Presentation # 9.0 [3] (🤼..🤾) WRESTLERS..HANDBALL +1F940..1F945 ; Emoji_Presentation # 9.0 [6] (🥀..🥅) WILTED FLOWER..GOAL NET +1F947..1F94B ; Emoji_Presentation # 9.0 [5] (🥇..🥋) FIRST PLACE MEDAL..MARTIAL ARTS UNIFORM +1F950..1F95E ; Emoji_Presentation # 9.0 [15] (🥐..🥞) CROISSANT..PANCAKES +1F980..1F984 ; Emoji_Presentation # 8.0 [5] (🦀..🦄) CRAB..UNICORN FACE +1F985..1F991 ; Emoji_Presentation # 9.0 [13] (🦅..🦑) EAGLE..SQUID +1F9C0 ; Emoji_Presentation # 8.0 [1] (🧀) CHEESE WEDGE + +# Total elements: 910 + +# ================================================ + +# All omitted code points have Emoji_Modifier=No +# @missing: 0000..10FFFF ; Emoji_Modifier ; No + +1F3FB..1F3FF ; Emoji_Modifier # 8.0 [5] (🏻..🏿) EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6 + +# Total elements: 5 + +# ================================================ + +# All omitted code points have Emoji_Modifier_Base=No +# @missing: 0000..10FFFF ; Emoji_Modifier_Base ; No + +261D ; Emoji_Modifier_Base # 1.1 [1] (☝) WHITE UP POINTING INDEX +26F9 ; Emoji_Modifier_Base # 5.2 [1] (⛹) PERSON WITH BALL +270A..270B ; Emoji_Modifier_Base # 6.0 [2] (✊..✋) RAISED FIST..RAISED HAND +270C..270D ; Emoji_Modifier_Base # 1.1 [2] (✌..✍) VICTORY HAND..WRITING HAND +1F385 ; Emoji_Modifier_Base # 6.0 [1] (🎅) FATHER CHRISTMAS +1F3C3..1F3C4 ; Emoji_Modifier_Base # 6.0 [2] (🏃..🏄) RUNNER..SURFER +1F3CA ; Emoji_Modifier_Base # 6.0 [1] (🏊) SWIMMER +1F3CB ; Emoji_Modifier_Base # 7.0 [1] (🏋) WEIGHT LIFTER +1F442..1F443 ; Emoji_Modifier_Base # 6.0 [2] (👂..👃) EAR..NOSE +1F446..1F450 ; Emoji_Modifier_Base # 6.0 [11] (👆..👐) WHITE UP POINTING BACKHAND INDEX..OPEN HANDS SIGN +1F466..1F469 ; Emoji_Modifier_Base # 6.0 [4] (👦..👩) BOY..WOMAN +1F46E ; Emoji_Modifier_Base # 6.0 [1] (👮) POLICE OFFICER +1F470..1F478 ; Emoji_Modifier_Base # 6.0 [9] (👰..👸) BRIDE WITH VEIL..PRINCESS +1F47C ; Emoji_Modifier_Base # 6.0 [1] (👼) BABY ANGEL +1F481..1F483 ; Emoji_Modifier_Base # 6.0 [3] (💁..💃) INFORMATION DESK PERSON..DANCER +1F485..1F487 ; Emoji_Modifier_Base # 6.0 [3] (💅..💇) NAIL POLISH..HAIRCUT +1F4AA ; Emoji_Modifier_Base # 6.0 [1] (💪) FLEXED BICEPS +1F575 ; Emoji_Modifier_Base # 7.0 [1] (🕵) SLEUTH OR SPY +1F57A ; Emoji_Modifier_Base # 9.0 [1] (🕺) MAN DANCING +1F590 ; Emoji_Modifier_Base # 7.0 [1] (🖐) RAISED HAND WITH FINGERS SPLAYED +1F595..1F596 ; Emoji_Modifier_Base # 7.0 [2] (🖕..🖖) REVERSED HAND WITH MIDDLE FINGER EXTENDED..RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS +1F645..1F647 ; Emoji_Modifier_Base # 6.0 [3] (🙅..🙇) FACE WITH NO GOOD GESTURE..PERSON BOWING DEEPLY +1F64B..1F64F ; Emoji_Modifier_Base # 6.0 [5] (🙋..🙏) HAPPY PERSON RAISING ONE HAND..PERSON WITH FOLDED HANDS +1F6A3 ; Emoji_Modifier_Base # 6.0 [1] (🚣) ROWBOAT +1F6B4..1F6B6 ; Emoji_Modifier_Base # 6.0 [3] (🚴..🚶) BICYCLIST..PEDESTRIAN +1F6C0 ; Emoji_Modifier_Base # 6.0 [1] (🛀) BATH +1F918 ; Emoji_Modifier_Base # 8.0 [1] (🤘) SIGN OF THE HORNS +1F919..1F91E ; Emoji_Modifier_Base # 9.0 [6] (🤙..🤞) CALL ME HAND..HAND WITH INDEX AND MIDDLE FINGERS CROSSED +1F926 ; Emoji_Modifier_Base # 9.0 [1] (🤦) FACE PALM +1F930 ; Emoji_Modifier_Base # 9.0 [1] (🤰) PREGNANT WOMAN +1F933..1F939 ; Emoji_Modifier_Base # 9.0 [7] (🤳..🤹) SELFIE..JUGGLING +1F93C..1F93E ; Emoji_Modifier_Base # 9.0 [3] (🤼..🤾) WRESTLERS..HANDBALL + +# Total elements: 83 + +#EOF -- cgit From 45598d2e5e2b56e24e4d5abe4f28f259e3def572 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 22 Sep 2016 00:40:45 -0400 Subject: vim-patch:7.4.1620 Problem: Emoji characters are not considered as a kind of word character. Solution: Give emoji characters a word class number. (Yashuhiro Matsumoto) https://github.com/vim/vim/commit/4077b33a8370afb3d5ae74e556a0119cf51fe294 --- scripts/genunicodetables.lua | 4 ++-- src/nvim/mbyte.c | 7 ++++++- src/nvim/version.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/genunicodetables.lua b/scripts/genunicodetables.lua index 08b8b0f90e..75adb36a8f 100644 --- a/scripts/genunicodetables.lua +++ b/scripts/genunicodetables.lua @@ -12,7 +12,7 @@ -- 2 then interval applies only to first, third, fifth, … character in range. -- Fourth value is number that should be added to the codepoint to yield -- folded/lower/upper codepoint. --- 4. emoji table: sorted list of non-overlapping closed intervals of Emoji +-- 4. emoji_tab table: sorted list of non-overlapping closed intervals of Emoji -- characters if arg[1] == '--help' then print('Usage:') @@ -221,7 +221,7 @@ local build_width_table = function(ut_fp, dataprops, widthprops, widths, end local build_emoji_table = function(ut_fp, emojiprops) - ut_fp:write('static const struct interval emoji[] = {\n') + ut_fp:write('static const struct interval emoji_tab[] = {\n') for _, p in ipairs(emojiprops) do if p[2]:match('Emoji%s+#') then local start, end_ = p[1]:find('%.%.') diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index e05b3f3a37..e4ed46208b 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -949,7 +949,7 @@ int utf_char2cells(int c) if (intable(doublewidth, ARRAY_SIZE(doublewidth), c)) return 2; #endif - if (p_emoji && intable(emoji, ARRAY_SIZE(emoji), c)) { + if (p_emoji && intable(emoji_tab, ARRAY_SIZE(emoji_tab), c)) { return 2; } } @@ -1715,6 +1715,11 @@ int utf_class(int c) return (int)classes[mid].class; } + // emoji + if (intable(emoji_tab, ARRAY_SIZE(emoji_tab), c)) { + return 3; + } + /* most other characters are "word" characters */ return 2; } diff --git a/src/nvim/version.c b/src/nvim/version.c index 0106185d13..43aaa6b1ed 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -823,7 +823,7 @@ static int included_patches[] = { // 1623 NA // 1622 NA // 1621 NA - // 1620, + 1620, // 1619, // 1618 NA // 1617 NA -- cgit From 1144cc6d9edd8d59b6f24e4d8f1df395342c2619 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 22 Sep 2016 00:43:19 -0400 Subject: vim-patch:7.4.1629 Problem: Handling emoji characters as full width has problems with backwards compatibility. Solution: Remove ambiguous and double width characters from the emoji table. Use a separate table for the character class. (partly by Yashuhiro Matsumoto) https://github.com/vim/vim/commit/b86f10ee10bdf932df02bdaf601dffa671518a47 --- scripts/genunicodetables.lua | 71 ++++++++++++++++++++++++++++++++++++-------- src/nvim/mbyte.c | 4 +-- src/nvim/version.c | 2 +- 3 files changed, 62 insertions(+), 15 deletions(-) diff --git a/scripts/genunicodetables.lua b/scripts/genunicodetables.lua index 75adb36a8f..d5fcb56566 100644 --- a/scripts/genunicodetables.lua +++ b/scripts/genunicodetables.lua @@ -175,6 +175,7 @@ local build_width_table = function(ut_fp, dataprops, widthprops, widths, local start = -1 local end_ = -1 local dataidx = 1 + local ret = {} for _, p in ipairs(widthprops) do if widths[p[2]:sub(1, 1)] then local rng_start, rng_end = p[1]:find('%.%.') @@ -207,6 +208,7 @@ local build_width_table = function(ut_fp, dataprops, widthprops, widths, else if start >= 0 then ut_fp:write(make_range(start, end_)) + table.insert(ret, {start, end_}) end start = n end @@ -216,25 +218,68 @@ local build_width_table = function(ut_fp, dataprops, widthprops, widths, end if start >= 0 then ut_fp:write(make_range(start, end_)) + table.insert(ret, {start, end_}) end ut_fp:write('};\n') + return ret end -local build_emoji_table = function(ut_fp, emojiprops) - ut_fp:write('static const struct interval emoji_tab[] = {\n') +local build_emoji_table = function(ut_fp, emojiprops, doublewidth, ambiwidth) + local emojiwidth = {} + local emoji = {} for _, p in ipairs(emojiprops) do if p[2]:match('Emoji%s+#') then - local start, end_ = p[1]:find('%.%.') - if start then - local n = tonumber(p[1]:sub(1, start - 1), 16) - local nl = tonumber(p[1]:sub(end_ + 1), 16) - ut_fp:write(make_range(n, nl)) + local rng_start, rng_end = p[1]:find('%.%.') + if rng_start then + n = tonumber(p[1]:sub(1, rng_start - 1), 16) + n_last = tonumber(p[1]:sub(rng_end + 1), 16) else - local n = tonumber(p[1], 16) - ut_fp:write(make_range(n, n)) + n = tonumber(p[1], 16) + n_last = n + end + if #emoji > 0 and n - 1 == emoji[#emoji][2] then + emoji[#emoji][2] = n_last + else + table.insert(emoji, { n, n_last }) + end + -- exclude characters that are in the ambiguous/doublewidth table + for _, ambi in ipairs(ambiwidth) do + if n >= ambi[1] and n <= ambi[2] then + n = ambi[2] + 1 + end + if n_last >= ambi[1] and n_last <= ambi[2] then + n_last = ambi[1] - 1 + end + end + for _, double in ipairs(doublewidth) do + if n >= double[1] and n <= double[2] then + n = double[2] + 1 + end + if n_last >= double[1] and n_last <= double[2] then + n_last = double[1] - 1 + end + end + + if n <= n_last then + if #emojiwidth > 0 and n - 1 == emojiwidth[#emojiwidth][2] then + emojiwidth[#emojiwidth][2] = n_last + else + table.insert(emojiwidth, { n, n_last }) + end end end end + + ut_fp:write('static const struct interval emoji_all[] = {\n') + for _, p in ipairs(emoji) do + ut_fp:write(make_range(p[1], p[2])) + end + ut_fp:write('};\n') + + ut_fp:write('static const struct interval emoji_width[] = {\n') + for _, p in ipairs(emojiwidth) do + ut_fp:write(make_range(p[1], p[2])) + end ut_fp:write('};\n') end @@ -258,13 +303,15 @@ local eaw_fp = io.open(eastasianwidth_fname, 'r') local widthprops = parse_width_props(eaw_fp) eaw_fp:close() -build_width_table(ut_fp, dataprops, widthprops, {W=true, F=true}, 'doublewidth') -build_width_table(ut_fp, dataprops, widthprops, {A=true}, 'ambiguous') +local doublewidth = build_width_table(ut_fp, dataprops, widthprops, + {W=true, F=true}, 'doublewidth') +local ambiwidth = build_width_table(ut_fp, dataprops, widthprops, + {A=true}, 'ambiguous') local emoji_fp = io.open(emoji_fname, 'r') local emojiprops = parse_emoji_props(emoji_fp) emoji_fp:close() -build_emoji_table(ut_fp, emojiprops) +build_emoji_table(ut_fp, emojiprops, doublewidth, ambiwidth) ut_fp:close() diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index e4ed46208b..2978171051 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -949,7 +949,7 @@ int utf_char2cells(int c) if (intable(doublewidth, ARRAY_SIZE(doublewidth), c)) return 2; #endif - if (p_emoji && intable(emoji_tab, ARRAY_SIZE(emoji_tab), c)) { + if (p_emoji && intable(emoji_width, ARRAY_SIZE(emoji_width), c)) { return 2; } } @@ -1716,7 +1716,7 @@ int utf_class(int c) } // emoji - if (intable(emoji_tab, ARRAY_SIZE(emoji_tab), c)) { + if (intable(emoji_all, ARRAY_SIZE(emoji_all), c)) { return 3; } diff --git a/src/nvim/version.c b/src/nvim/version.c index 43aaa6b1ed..02ee2113b9 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -814,7 +814,7 @@ static int included_patches[] = { // 1632 NA // 1631 NA // 1630, - // 1629, + 1629, // 1628 NA // 1627 NA // 1626 NA -- cgit From e161d6a19de2dbbbd1e2c209b88903c59a2eaae6 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 22 Sep 2016 00:56:09 -0400 Subject: vim-patch:7.4.1630 Problem: Unicode table for double width is outdated. Solution: Update to the latest Unicode standard. https://github.com/vim/vim/commit/d63aff0a65b955447de2fd8bfdaee29b61ce2843 --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/version.c b/src/nvim/version.c index 02ee2113b9..eef77fbba7 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -813,7 +813,7 @@ static int included_patches[] = { // 1633 NA // 1632 NA // 1631 NA - // 1630, + 1630, 1629, // 1628 NA // 1627 NA -- cgit From dafca1ad68676d83845086963d3ef09d2e91679f Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 22 Sep 2016 00:12:44 -0400 Subject: vim-patch:7.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. https://github.com/vim/vim/commit/6a08454b93784c92296d4c08456401cbaa74c9d5 --- scripts/genunicodetables.lua | 50 +++++++++++++++++++++++++------------------- src/nvim/version.c | 2 +- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/scripts/genunicodetables.lua b/scripts/genunicodetables.lua index d5fcb56566..f66f738659 100644 --- a/scripts/genunicodetables.lua +++ b/scripts/genunicodetables.lua @@ -12,8 +12,9 @@ -- 2 then interval applies only to first, third, fifth, … character in range. -- Fourth value is number that should be added to the codepoint to yield -- folded/lower/upper codepoint. --- 4. emoji_tab table: sorted list of non-overlapping closed intervals of Emoji --- characters +-- 4. emoji_width and emoji_all tables: sorted lists of non-overlapping closed +-- intervals of Emoji characters. emoji_width contains all the characters +-- which don't have ambiguous or double width, and emoji_all has all Emojis. if arg[1] == '--help' then print('Usage:') print(' genunicodetables.lua UnicodeData.txt CaseFolding.txt ' .. @@ -242,29 +243,34 @@ local build_emoji_table = function(ut_fp, emojiprops, doublewidth, ambiwidth) else table.insert(emoji, { n, n_last }) end - -- exclude characters that are in the ambiguous/doublewidth table - for _, ambi in ipairs(ambiwidth) do - if n >= ambi[1] and n <= ambi[2] then - n = ambi[2] + 1 - end - if n_last >= ambi[1] and n_last <= ambi[2] then - n_last = ambi[1] - 1 - end - end - for _, double in ipairs(doublewidth) do - if n >= double[1] and n <= double[2] then - n = double[2] + 1 + + -- Characters below 1F000 may be considered single width traditionally, + -- making them double width causes problems. + if n >= 0x1f000 then + -- exclude characters that are in the ambiguous/doublewidth table + for _, ambi in ipairs(ambiwidth) do + if n >= ambi[1] and n <= ambi[2] then + n = ambi[2] + 1 + end + if n_last >= ambi[1] and n_last <= ambi[2] then + n_last = ambi[1] - 1 + end end - if n_last >= double[1] and n_last <= double[2] then - n_last = double[1] - 1 + for _, double in ipairs(doublewidth) do + if n >= double[1] and n <= double[2] then + n = double[2] + 1 + end + if n_last >= double[1] and n_last <= double[2] then + n_last = double[1] - 1 + end end - end - if n <= n_last then - if #emojiwidth > 0 and n - 1 == emojiwidth[#emojiwidth][2] then - emojiwidth[#emojiwidth][2] = n_last - else - table.insert(emojiwidth, { n, n_last }) + if n <= n_last then + if #emojiwidth > 0 and n - 1 == emojiwidth[#emojiwidth][2] then + emojiwidth[#emojiwidth][2] = n_last + else + table.insert(emojiwidth, { n, n_last }) + end end end end diff --git a/src/nvim/version.c b/src/nvim/version.c index eef77fbba7..b403ccfb80 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -801,7 +801,7 @@ static int included_patches[] = { // 1645, // 1644, 1643, - // 1642, + 1642, 1641, // 1640, // 1639, -- cgit From 9419a4c86c9bbcd40f2146a97ad7ceac8ec8b847 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 22 Sep 2016 00:25:38 -0400 Subject: lint --- src/nvim/option.c | 12 ++++++------ src/nvim/option_defs.h | 36 ++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/nvim/option.c b/src/nvim/option.c index acefe5b4aa..89889aa997 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2518,15 +2518,15 @@ did_set_string_option ( else if (varp == &p_sbo) { if (check_opt_strings(p_sbo, p_scbopt_values, TRUE) != OK) errmsg = e_invarg; - } - /* 'ambiwidth' */ - else if (varp == &p_ambw || (bool *)varp == &p_emoji) { - if (check_opt_strings(p_ambw, p_ambw_values, FALSE) != OK) + } else if (varp == &p_ambw || (bool *)varp == &p_emoji) { + // 'ambiwidth' + if (check_opt_strings(p_ambw, p_ambw_values, false) != OK) { errmsg = e_invarg; - else if (set_chars_option(&p_lcs) != NULL) + } else if (set_chars_option(&p_lcs) != NULL) { errmsg = (char_u *)_("E834: Conflicts with value of 'listchars'"); - else if (set_chars_option(&p_fcs) != NULL) + } else if (set_chars_option(&p_fcs) != NULL) { errmsg = (char_u *)_("E835: Conflicts with value of 'fillchars'"); + } } /* 'background' */ else if (varp == &p_bg) { diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h index 00ab25c406..e085b973ea 100644 --- a/src/nvim/option_defs.h +++ b/src/nvim/option_defs.h @@ -401,25 +401,25 @@ static char *(p_dy_values[]) = {"lastline", "uhex", NULL}; #endif #define DY_LASTLINE 0x001 #define DY_UHEX 0x002 -EXTERN int p_ed; /* 'edcompatible' */ +EXTERN int p_ed; // 'edcompatible' EXTERN bool p_emoji; // 'emoji' -EXTERN char_u *p_ead; /* 'eadirection' */ -EXTERN bool p_ea; /* 'equalalways' */ -EXTERN char_u *p_ep; /* 'equalprg' */ -EXTERN int p_eb; /* 'errorbells' */ -EXTERN char_u *p_ef; /* 'errorfile' */ -EXTERN char_u *p_efm; /* 'errorformat' */ -EXTERN char_u *p_gefm; /* 'grepformat' */ -EXTERN char_u *p_gp; /* 'grepprg' */ -EXTERN char_u *p_ei; /* 'eventignore' */ -EXTERN int p_ek; /* 'esckeys' */ -EXTERN int p_exrc; /* 'exrc' */ -EXTERN char_u *p_fencs; /* 'fileencodings' */ -EXTERN char_u *p_ffs; /* 'fileformats' */ -EXTERN bool p_fic; ///< 'fileignorecase' -EXTERN char_u *p_fcl; /* 'foldclose' */ -EXTERN long p_fdls; /* 'foldlevelstart' */ -EXTERN char_u *p_fdo; /* 'foldopen' */ +EXTERN char_u *p_ead; // 'eadirection' +EXTERN bool p_ea; // 'equalalways' +EXTERN char_u *p_ep; // 'equalprg' +EXTERN int p_eb; // 'errorbells' +EXTERN char_u *p_ef; // 'errorfile' +EXTERN char_u *p_efm; // 'errorformat' +EXTERN char_u *p_gefm; // 'grepformat' +EXTERN char_u *p_gp; // 'grepprg' +EXTERN char_u *p_ei; // 'eventignore' +EXTERN int p_ek; // 'esckeys' +EXTERN int p_exrc; // 'exrc' +EXTERN char_u *p_fencs; // 'fileencodings' +EXTERN char_u *p_ffs; // 'fileformats' +EXTERN bool p_fic; // 'fileignorecase' +EXTERN char_u *p_fcl; // 'foldclose' +EXTERN long p_fdls; // 'foldlevelstart' +EXTERN char_u *p_fdo; // 'foldopen' EXTERN unsigned fdo_flags; # ifdef IN_OPTION_C static char *(p_fdo_values[]) = {"all", "block", "hor", "mark", "percent", -- cgit From 9e1c659666b5909b0ebb77406db42bc6892659d6 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 22 Sep 2016 00:58:46 -0400 Subject: vim-patch:7.4.1697 Problem: Display problems when the 'ambiwidth' and 'emoji' options are not set properly or the terminal doesn't behave as expected. Solution: After drawing an ambiguous width character always position the cursor. https://github.com/vim/vim/commit/cb0700844c1274fe8bc0ceaffaee0ad21c406f30 --- src/nvim/mbyte.c | 11 +++++------ src/nvim/ui.c | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 2978171051..c08b9e8fcf 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -1724,12 +1724,11 @@ int utf_class(int c) return 2; } -/* - * Code for Unicode case-dependent operations. Based on notes in - * http://www.unicode.org/Public/UNIDATA/CaseFolding.txt - * This code uses simple case folding, not full case folding. - * Last updated for Unicode 5.2. - */ +int utf_ambiguous_width(int c) +{ + return c >= 0x80 && (intable(ambiguous, ARRAY_SIZE(ambiguous), c) + || intable(emoji_all, ARRAY_SIZE(emoji_all), c)); +} /* * Generic conversion function for case operations. diff --git a/src/nvim/ui.c b/src/nvim/ui.c index b8d44cbcf8..648d633e07 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -397,7 +397,10 @@ static void send_output(uint8_t **ptr) size_t clen = (size_t)mb_ptr2len(p); UI_CALL(put, p, (size_t)clen); col++; - if (mb_ptr2cells(p) > 1) { + if (utf_ambiguous_width(*p)) { + pending_cursor_update = true; + flush_cursor_update(); + } else if (mb_ptr2cells(p) > 1) { // double cell character, blank the next cell UI_CALL(put, NULL, 0); col++; -- cgit From 4ce24ff9da0f6551eeca2011dc9d05194bf02e12 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 24 Sep 2016 14:27:04 -0400 Subject: genunicodetables: Give the unicode directory as the first argument Let genunicodetables determine which files it needs from the unicode directory. cmake just needs to pass the directory and destination file to the script. --- scripts/genunicodetables.lua | 20 ++++++++++++-------- src/nvim/CMakeLists.txt | 15 +++------------ 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/scripts/genunicodetables.lua b/scripts/genunicodetables.lua index f66f738659..66430ba26e 100644 --- a/scripts/genunicodetables.lua +++ b/scripts/genunicodetables.lua @@ -17,18 +17,22 @@ -- which don't have ambiguous or double width, and emoji_all has all Emojis. if arg[1] == '--help' then print('Usage:') - print(' genunicodetables.lua UnicodeData.txt CaseFolding.txt ' .. - 'EastAsianWidth.txt emoji-data.txt') - print(' unicode_tables.generated.h') + print(' genunicodetables.lua unicode/ unicode_tables.generated.h') os.exit(0) end -local unicodedata_fname = arg[1] -local casefolding_fname = arg[2] -local eastasianwidth_fname = arg[3] -local emoji_fname = arg[4] +local basedir = arg[1] +local pathsep = package.config:sub(1, 1) +local get_path = function(fname) + return basedir .. pathsep .. fname +end + +local unicodedata_fname = get_path('UnicodeData.txt') +local casefolding_fname = get_path('CaseFolding.txt') +local eastasianwidth_fname = get_path('EastAsianWidth.txt') +local emoji_fname = get_path('emoji-data.txt') -local utf_tables_fname = arg[5] +local utf_tables_fname = arg[2] local split_on_semicolons = function(s) local ret = {} diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 64e99fb475..59582d0734 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -36,10 +36,7 @@ set(EVAL_DEFS_FILE ${PROJECT_SOURCE_DIR}/src/nvim/eval.lua) set(OPTIONS_LIST_FILE ${PROJECT_SOURCE_DIR}/src/nvim/options.lua) set(UNICODE_TABLES_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genunicodetables.lua) set(UNICODE_DIR ${PROJECT_SOURCE_DIR}/unicode) -set(UNICODEDATA_FILE ${UNICODE_DIR}/UnicodeData.txt) -set(CASEFOLDING_FILE ${UNICODE_DIR}/CaseFolding.txt) -set(EASTASIANWIDTH_FILE ${UNICODE_DIR}/EastAsianWidth.txt) -set(EMOJI_FILE ${UNICODE_DIR}/emoji-data.txt) +file(GLOB UNICODE_FILES ${UNICODE_DIR}/*.txt) set(GENERATED_UNICODE_TABLES ${GENERATED_DIR}/unicode_tables.generated.h) include_directories(${GENERATED_DIR}) @@ -193,17 +190,11 @@ endforeach() add_custom_command(OUTPUT ${GENERATED_UNICODE_TABLES} COMMAND ${LUA_PRG} ${UNICODE_TABLES_GENERATOR} - ${UNICODEDATA_FILE} - ${CASEFOLDING_FILE} - ${EASTASIANWIDTH_FILE} - ${EMOJI_FILE} + ${UNICODE_DIR} ${GENERATED_UNICODE_TABLES} DEPENDS ${UNICODE_TABLES_GENERATOR} - ${UNICODEDATA_FILE} - ${CASEFOLDING_FILE} - ${EASTASIANWIDTH_FILE} - ${EMOJI_FILE} + ${UNICODE_FILES} ) add_custom_command(OUTPUT ${GENERATED_API_DISPATCH} ${API_METADATA} -- cgit