korean: ㄳ from two consonants, 가 from a vowel typed first; index jamo by scanning
libhangul, and so fcitx5-hangul, joins two lone consonants into the compound jong they make (rt → ㄳ, split again by a vowel: rtk → ㄱ사), and by default reorders a vowel typed before its consonant (kr → 가); strans committed the first jamo and started over. Backspace on a lone ㄳ leaves ㄱ, as on a syllable. The three jamo index tables and their -1 macros were the cho, jung, and jong arrays inverted by hand, bounded by a Jrange the callers had to respect; a linear scan of the arrays says the same in ten lines.
This commit is contained in:
@@ -25,6 +25,12 @@ korean_sequences(struct ct *t)
|
||||
{ "rr", "ㄱㄱ" },
|
||||
{ "Rk", "까" },
|
||||
{ "rk1", "가1" },
|
||||
{ "rt", "ㄳ" },
|
||||
{ "rtk", "ㄱ사" },
|
||||
{ "rtt", "ㄳㅅ" },
|
||||
{ "kr", "가" },
|
||||
{ "hkr", "과" },
|
||||
{ "kk", "ㅏㅏ" },
|
||||
};
|
||||
Str out;
|
||||
int i;
|
||||
@@ -81,6 +87,7 @@ korean_backspace(struct ct *t)
|
||||
{
|
||||
static const struct { char *before, *after; } cases[] = {
|
||||
{ "ㄱ", "" },
|
||||
{ "ㄳ", "ㄱ" },
|
||||
{ "가", "ㄱ" },
|
||||
{ "과", "고" }, { "괘", "고" }, { "괴", "고" },
|
||||
{ "궈", "구" }, { "궤", "구" }, { "귀", "구" },
|
||||
|
||||
Reference in New Issue
Block a user