summaryrefslogtreecommitdiff
path: root/pango/break.c
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2019-04-02 14:15:59 +0800
committerPeng Wu <alexepico@gmail.com>2019-04-02 17:57:21 +0800
commitac67bc285e9335797450e7172ce218fbcce32fb6 (patch)
tree62b6f76c6361149c35392d87792419e68ef10960 /pango/break.c
parent982445fe1c234b1ef5173556a73f659946c1a288 (diff)
downloadpango-ac67bc285e9335797450e7172ce218fbcce32fb6.tar.gz
Fixes emoji backspace deletion behavior
Diffstat (limited to 'pango/break.c')
-rw-r--r--pango/break.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/break.c b/pango/break.c
index 355518eb..37be1c65 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -124,7 +124,8 @@ static const CharJamoProps HangulJamoProps[] = {
#define GREEK(wc) (((wc) >= 0x0370 && (wc) <= 0x3FF) || ((wc) >= 0x1F00 && (wc) <= 0x1FFF))
#define KANA(wc) ((wc) >= 0x3040 && (wc) <= 0x30FF)
#define HANGUL(wc) ((wc) >= 0xAC00 && (wc) <= 0xD7A3)
-#define BACKSPACE_DELETES_CHARACTER(wc) (!LATIN (wc) && !CYRILLIC (wc) && !GREEK (wc) && !KANA(wc) && !HANGUL(wc))
+#define EMOJI(wc) (_pango_Is_Emoji_Base_Character (wc))
+#define BACKSPACE_DELETES_CHARACTER(wc) (!LATIN (wc) && !CYRILLIC (wc) && !GREEK (wc) && !KANA (wc) && !HANGUL (wc) && !EMOJI (wc))
/* Previously "123foo" was two words. But in UAX 29 of Unicode,
* we know don't break words between consecutive letters and numbers