diff options
| author | Peng Wu <alexepico@gmail.com> | 2015-08-19 11:36:26 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2015-08-19 11:36:26 +0800 |
| commit | 0ddb44c55238cbaa431aa1f525e8625563830d2a (patch) | |
| tree | 345c865f302e0ec5aefa2d9f8bae94a9ab0d1e6b | |
| parent | b3744fe3546dbe7a71007d5d8a27194ab279b8cd (diff) | |
fixes updateZhuyin method1.7.4
| -rw-r--r-- | src/ZYZZhuyinEditor.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ZYZZhuyinEditor.cc b/src/ZYZZhuyinEditor.cc index 9fb2709..7593f62 100644 --- a/src/ZYZZhuyinEditor.cc +++ b/src/ZYZZhuyinEditor.cc @@ -73,6 +73,7 @@ ZhuyinEditor::updateZhuyin (void) static const char * tones[] = {" ", "ˊ", "ˇ", "ˋ", "˙", NULL}; const String & enhanced_text = m_text; + const size_t text_len = get_enhanced_text_length (enhanced_text); String new_text; size_t append_offset = 0; @@ -111,7 +112,7 @@ ZhuyinEditor::updateZhuyin (void) /* check whether the last character is tone, if not part of parsed chewing input, turn the tone into symbol. */ - if (end_pos == m_text.size ()) { + if (m_cursor == text_len && end_pos == m_text.size ()) { /* check tone symbol. */ const char tone = section[section.size () - 1]; |
