diff options
author | Peng Wu <alexepico@gmail.com> | 2015-06-25 13:34:22 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-06-25 13:34:22 +0800 |
commit | 378473e32fb9cbb61a327ae7c67cbaf36a5c40e2 (patch) | |
tree | 733349524b7bb51d984ff28c5eab9da544fcb050 | |
parent | dbf038b76dcc99fc8cec4532c272999c9d1a4c53 (diff) | |
download | ibus-libzhuyin-378473e32fb9cbb61a327ae7c67cbaf36a5c40e2.tar.gz ibus-libzhuyin-378473e32fb9cbb61a327ae7c67cbaf36a5c40e2.tar.xz ibus-libzhuyin-378473e32fb9cbb61a327ae7c67cbaf36a5c40e2.zip |
Revert "restore updateZhuyin method"
This reverts commit 0d92d8536cd1fe5e4e284b407dd2f98445234cac.
-rw-r--r-- | src/ZYZZhuyinEditor.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ZYZZhuyinEditor.cc b/src/ZYZZhuyinEditor.cc index 26fc028..a0f004c 100644 --- a/src/ZYZZhuyinEditor.cc +++ b/src/ZYZZhuyinEditor.cc @@ -87,6 +87,21 @@ ZhuyinEditor::updateZhuyin (void) (instance, section.c_str ()); zhuyin_guess_sentence (instance); + /* check whether the last character is space, + if not part of parsed chewing input, + turn the space into symbol. */ + if (end_pos == m_text.size () && + ' ' == section[section.size () - 1] && + section.size () > len) { + size_t length = get_enhanced_text_length (m_text); + erase_input_sequence (m_text, length - 1, 1); + insert_symbol (m_text, length - 1, BUILTIN_SYMBOL_TYPE, + "", " "); + /* as we changed the last space character, + reached the end of user input, exit the loop. */ + break; + } + ++index; } |