summaryrefslogtreecommitdiffstats
path: root/src/PYPPhoneticEditor.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-07-04 13:19:47 +0800
committerPeng Wu <alexepico@gmail.com>2012-07-04 13:19:47 +0800
commite16682240d6df8777a7b6605811258b5ec71cec1 (patch)
tree49bf7b3f45088eeaaa14be8ef0c63fd77277d9dd /src/PYPPhoneticEditor.cc
parent26b0d48bdb4fdefea795862c9a58acdb9cfb1b96 (diff)
downloadibus-libpinyin-e16682240d6df8777a7b6605811258b5ec71cec1.tar.gz
ibus-libpinyin-e16682240d6df8777a7b6605811258b5ec71cec1.tar.xz
ibus-libpinyin-e16682240d6df8777a7b6605811258b5ec71cec1.zip
fixes fillLookupTableByPage
Diffstat (limited to 'src/PYPPhoneticEditor.cc')
-rw-r--r--src/PYPPhoneticEditor.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/PYPPhoneticEditor.cc b/src/PYPPhoneticEditor.cc
index bdc05d8..a9b81ce 100644
--- a/src/PYPPhoneticEditor.cc
+++ b/src/PYPPhoneticEditor.cc
@@ -204,7 +204,7 @@ LibPinyinPhoneticEditor::fillLookupTableByPage (void)
if (need_nr == 0)
return FALSE;
- String word, phrase_string;
+ String word;
for (guint i = filled_nr; i < filled_nr + need_nr; i++) {
if (i >= m_candidates->len) /* no more candidates */
break;
@@ -212,14 +212,7 @@ LibPinyinPhoneticEditor::fillLookupTableByPage (void)
lookup_candidate_t * candidate = &g_array_index
(m_candidates, lookup_candidate_t, i);
- phrase_string = candidate->m_phrase_string;
-
- if (BEST_MATCH_CANDIDATE == candidate->m_candidate_type) {
- /* hide selected part */
- guint cursor = getLookupCursor ();
- phrase_string = g_utf8_offset_to_pointer
- (candidate->m_phrase_string, cursor);
- }
+ const gchar * phrase_string = candidate->m_phrase_string;
/* show get candidates. */
if (G_LIKELY (m_props.modeSimp ())) {