[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 297c9aa: Fix cursor motion around some Emoji sequences
From: |
Eli Zaretskii |
Subject: |
master 297c9aa: Fix cursor motion around some Emoji sequences |
Date: |
Sat, 25 Sep 2021 05:19:26 -0400 (EDT) |
branch: master
commit 297c9aa3deb64596b7ea19ae7d65a3ae614c7d2f
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix cursor motion around some Emoji sequences
* src/character.h: Add TAG_SPACE and CANCEL_TAG to known Unicode
characters values.
* src/composite.c (char_composable_p): Recognize TAG characters
relevant to Emoji as composable regardless of their General
Category. (Bug#39799)
---
src/character.h | 2 ++
src/composite.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/src/character.h b/src/character.h
index 1a74548..6ee6bca 100644
--- a/src/character.h
+++ b/src/character.h
@@ -82,6 +82,8 @@ enum
LEFT_ANGLE_BRACKET = 0x3008,
RIGHT_ANGLE_BRACKET = 0x3009,
OBJECT_REPLACEMENT_CHARACTER = 0xFFFC,
+ TAG_SPACE = 0xE0020,
+ CANCEL_TAG = 0xE007F,
};
extern int char_string (unsigned, unsigned char *);
diff --git a/src/composite.c b/src/composite.c
index e97f8e2..c37b1fd 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -953,6 +953,9 @@ char_composable_p (int c)
Lisp_Object val;
return (c >= ' '
&& (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER
+ /* Per Unicode TR51, these tag characters can be part of
+ Emoji sequences. */
+ || (TAG_SPACE <= c && c <= CANCEL_TAG)
/* unicode-category-table may not be available during
dumping. */
|| (CHAR_TABLE_P (Vunicode_category_table)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 297c9aa: Fix cursor motion around some Emoji sequences,
Eli Zaretskii <=