From 15ae23dc3b5d07f94a3846a52489975b6b2f6b58 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Wed, 14 Apr 2010 18:33:30 +0800 Subject: [PATCH] Fix commit special phrases issue --- src/PinyinEditor.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PinyinEditor.cc b/src/PinyinEditor.cc index 78eca69..3275469 100644 --- a/src/PinyinEditor.cc +++ b/src/PinyinEditor.cc @@ -79,9 +79,8 @@ PinyinEditor::processSpace (guint keyval, guint keycode, guint modifiers) return FALSE; if (CMSHM_FILTER (modifiers) != 0) return TRUE; - if (m_selected_special_phrase.empty () && - m_phrase_editor.pinyinExistsAfterCursor ()) { - selectCandidate (m_lookup_table.cursorPos ()); + if (m_lookup_table.size () != 0) { + selectCandidate (m_lookup_table.cursorPos ()); } else { commit (); @@ -406,7 +405,7 @@ PinyinEditor::updateAuxiliaryText (void) { /* clear pinyin array */ if (G_UNLIKELY (m_text.empty () || - m_phrase_editor.cursor () == m_pinyin.size ())) { + m_lookup_table.size () == 0)) { hideAuxiliaryText (); return; } -- 2.7.4