diff options
| author | Peng Huang <shawn.p.huang@gmail.com> | 2010-05-19 13:21:00 +0800 |
|---|---|---|
| committer | Peng Huang <shawn.p.huang@gmail.com> | 2010-05-19 13:21:00 +0800 |
| commit | 5293d9fa8c71471c8fa7e94b05e4ea7bfdff2538 (patch) | |
| tree | f32f0bbd017c636579ffdc46f8e32fbeda596fc2 /src | |
| parent | ca5db95f90da616c7a9db0a57a2e9ae0a77d7dc0 (diff) | |
| download | ibus-libpinyin-5293d9fa8c71471c8fa7e94b05e4ea7bfdff2538.tar.gz ibus-libpinyin-5293d9fa8c71471c8fa7e94b05e4ea7bfdff2538.tar.xz ibus-libpinyin-5293d9fa8c71471c8fa7e94b05e4ea7bfdff2538.zip | |
Clear the lookup table when cursor == 0
Diffstat (limited to 'src')
| -rw-r--r-- | src/PunctEditor.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/PunctEditor.cc b/src/PunctEditor.cc index 63bb6ff..46bb232 100644 --- a/src/PunctEditor.cc +++ b/src/PunctEditor.cc @@ -314,6 +314,7 @@ PunctEditor::moveCursorToBegin (void) g_assert (m_punct_mode == MODE_NORMAL); m_cursor = 0; m_punct_candidates.clear (); + fillLookupTable (); update (); return TRUE; @@ -367,6 +368,7 @@ PunctEditor::removeCharBefore (void) } else { m_punct_candidates.clear (); + fillLookupTable (); } } @@ -529,11 +531,10 @@ PunctEditor::updatePunctCandidates (gchar ch) G_N_ELEMENTS (punct_table), sizeof(punct_table[0]), punct_cmp); - if (brs == NULL) - return; - - for (res = (*brs) + 1; *res != NULL; ++res) { - m_punct_candidates.push_back (*res); + if (brs != NULL) { + for (res = (*brs) + 1; *res != NULL; ++res) { + m_punct_candidates.push_back (*res); + } } fillLookupTable (); } |
