diff options
author | Peng Wu <alexepico@gmail.com> | 2014-01-20 13:25:14 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2014-01-20 13:25:14 +0800 |
commit | 740f54eed08e34348b377a33719368a05328e8fa (patch) | |
tree | 62a45e62833a58870d4a87b59a2452c27d7fa8df /src | |
parent | d682ca3dd46016f37e362008379fbc25e13f1814 (diff) | |
download | libpinyin-740f54eed08e34348b377a33719368a05328e8fa.tar.gz libpinyin-740f54eed08e34348b377a33719368a05328e8fa.tar.xz libpinyin-740f54eed08e34348b377a33719368a05328e8fa.zip |
fixes pinyin_choose_candidate
Diffstat (limited to 'src')
-rw-r--r-- | src/pinyin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp index 28f7c2a..5ac65e0 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -1848,6 +1848,9 @@ int pinyin_choose_candidate(pinyin_instance_t * instance, pinyin_context_t * & context = instance->m_context; + if (BEST_MATCH_CANDIDATE == candidate->m_candidate_type) + return instance->m_pinyin_keys->len; + if (DIVIDED_CANDIDATE == candidate->m_candidate_type || RESPLIT_CANDIDATE == candidate->m_candidate_type) { /* update full pinyin. */ |