comparison src/spell.c @ 17434:26e8d42987ca v8.1.1715

patch 8.1.1715: emoji characters are seen as word characters for spelling commit https://github.com/vim/vim/commit/06e6377009c5763639310fa3bf892dec27a63334 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 19 23:04:34 2019 +0200 patch 8.1.1715: emoji characters are seen as word characters for spelling Problem: Emoji characters are seen as word characters for spelling. (Gautam Iyer) Solution: Exclude class 3 from word characters.
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Jul 2019 23:15:05 +0200
parents ce04ebdf26b8
children cc68aca87c17
comparison
equal deleted inserted replaced
17433:ca8e754bdd53 17434:26e8d42987ca
3075 spell_mb_isword_class(int cl, win_T *wp) 3075 spell_mb_isword_class(int cl, win_T *wp)
3076 { 3076 {
3077 if (wp->w_s->b_cjk) 3077 if (wp->w_s->b_cjk)
3078 /* East Asian characters are not considered word characters. */ 3078 /* East Asian characters are not considered word characters. */
3079 return cl == 2 || cl == 0x2800; 3079 return cl == 2 || cl == 0x2800;
3080 return cl >= 2 && cl != 0x2070 && cl != 0x2080; 3080 return cl >= 2 && cl != 0x2070 && cl != 0x2080 && cl != 3;
3081 } 3081 }
3082 3082
3083 /* 3083 /*
3084 * Return TRUE if "p" points to a word character. 3084 * Return TRUE if "p" points to a word character.
3085 * Wide version of spell_iswordp(). 3085 * Wide version of spell_iswordp().