diff options
author | Peng Wu <alexepico@gmail.com> | 2015-04-29 15:54:47 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-04-29 15:54:47 +0800 |
commit | fe54b6c86d94e95cd38026d4d84c7b05859a8d4f (patch) | |
tree | 5bfddbdffa2c702d9266d4ab1512a658836748a7 /src/storage | |
parent | 39641675ecda9f9e39a9b8073dc03c74eb435234 (diff) | |
download | libzhuyin-fe54b6c86d94e95cd38026d4d84c7b05859a8d4f.tar.gz libzhuyin-fe54b6c86d94e95cd38026d4d84c7b05859a8d4f.tar.xz libzhuyin-fe54b6c86d94e95cd38026d4d84c7b05859a8d4f.zip |
fixes space key display
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/chewing_table.h | 2 | ||||
-rw-r--r-- | src/storage/pinyin_parser2.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/storage/chewing_table.h b/src/storage/chewing_table.h index 661be86..fb36d64 100644 --- a/src/storage/chewing_table.h +++ b/src/storage/chewing_table.h @@ -490,7 +490,7 @@ const chewing_tone_item_t chewing_dachen_cp26_tones[] = { const char * chewing_tone_table[CHEWING_NUMBER_OF_TONES] = { "", -"ˉ", +" ", "ˊ", "ˇ", "ˋ", diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index 51f3ae8..f78653f 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -1289,6 +1289,11 @@ bool ChewingDirectParser2::parse_one_key(pinyin_option_t options, break; } } + + /* check the force tone option. */ + if (options & FORCE_TONE && CHEWING_ZERO_TONE == tone) { + return false; + } } gchar * chewing = g_strndup(str, len); @@ -1334,7 +1339,7 @@ int ChewingDirectParser2::parse(pinyin_option_t options, return parsed_len; } - /* skip consecutive spaces */ + /* skip consecutive spaces. */ for (i = next; i < len; ++i) { if (' ' != str[i] && '\'' != str[i]) break; |