diff options
Diffstat (limited to 'hangul/hangulinputcontext.c')
-rw-r--r-- | hangul/hangulinputcontext.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hangul/hangulinputcontext.c b/hangul/hangulinputcontext.c index 0585d71..83ce52e 100644 --- a/hangul/hangulinputcontext.c +++ b/hangul/hangulinputcontext.c @@ -236,6 +236,7 @@ struct _HangulInputContext { unsigned int use_jamo_mode_only : 1; unsigned int option_auto_reorder : 1; unsigned int option_combi_on_double_stroke : 1; + unsigned int option_non_choseong_combi : 1; }; #include "hangulkeyboard.h" @@ -870,6 +871,13 @@ hangul_ic_combine(HangulInputContext* hic, ucschar first, ucschar second) combined = hangul_combination_combine(hic->keyboard->combination, first, second); + if (!hic->option_non_choseong_combi) { + if (hangul_is_choseong(first) && hangul_is_choseong(second) && + hangul_is_jongseong(combined)) { + return 0; + } + } + return combined; } @@ -1589,6 +1597,8 @@ hangul_ic_get_option(HangulInputContext* hic, int option) return hic->option_auto_reorder; case HANGUL_IC_OPTION_COMBI_ON_DOUBLE_STROKE: return hic->option_combi_on_double_stroke; + case HANGUL_IC_OPTION_NON_CHOSEONG_COMBI: + return hic->option_non_choseong_combi; } return false; @@ -1604,6 +1614,9 @@ hangul_ic_set_option(HangulInputContext* hic, int option, bool value) case HANGUL_IC_OPTION_COMBI_ON_DOUBLE_STROKE: hic->option_combi_on_double_stroke = value; break; + case HANGUL_IC_OPTION_NON_CHOSEONG_COMBI: + hic->option_non_choseong_combi = value; + break; } } @@ -1765,6 +1778,7 @@ hangul_ic_new(const char* keyboard) hic->option_auto_reorder = false; hic->option_combi_on_double_stroke = false; + hic->option_non_choseong_combi = true; hangul_ic_set_output_mode(hic, HANGUL_OUTPUT_SYLLABLE); hangul_ic_select_keyboard(hic, keyboard); |