summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2017-05-23 16:21:05 +0800
committerPeng Wu <alexepico@gmail.com>2017-05-23 16:21:05 +0800
commite6ff8c72bd4de2f02a7c26c9e4d614646fb12e62 (patch)
treea4b85c38ebecad63cc10619522842f6ae4af7ccd
parent597bbcd3f3d12ad0d03503c3046964fbc94f8043 (diff)
downloadibus-libzhuyin-e6ff8c72bd4de2f02a7c26c9e4d614646fb12e62.tar.gz
ibus-libzhuyin-e6ff8c72bd4de2f02a7c26c9e4d614646fb12e62.tar.xz
ibus-libzhuyin-e6ff8c72bd4de2f02a7c26c9e4d614646fb12e62.zip
drop zhuyin_valid_zhuyin_keys function
-rw-r--r--src/ZYZPinyinEditor.cc12
-rw-r--r--src/ZYZZhuyinEditor.cc15
2 files changed, 2 insertions, 25 deletions
diff --git a/src/ZYZPinyinEditor.cc b/src/ZYZPinyinEditor.cc
index fdb98aa..05e1c92 100644
--- a/src/ZYZPinyinEditor.cc
+++ b/src/ZYZPinyinEditor.cc
@@ -90,18 +90,6 @@ PinyinEditor::updateZhuyin (void)
zhuyin_instance_t * instance = m_instances[index];
size_t len = zhuyin_parse_more_full_pinyins
(instance, section.c_str ());
- bool valid = zhuyin_valid_zhuyin_keys (instance);
- if (!valid) {
- size_t valid_len = zhuyin_get_parsed_input_length (instance);
-
- const gchar * str = NULL;
- zhuyin_get_raw_user_input (instance, &str);
- section = str;
-
- /* hack here: usually only one zhuyin key will have problem,
- so it is safe to just move the cursor. */
- m_cursor -= len - valid_len;
- }
zhuyin_guess_sentence (instance);
new_text += section;
diff --git a/src/ZYZZhuyinEditor.cc b/src/ZYZZhuyinEditor.cc
index a4d5486..1d7b99a 100644
--- a/src/ZYZZhuyinEditor.cc
+++ b/src/ZYZZhuyinEditor.cc
@@ -92,23 +92,12 @@ ZhuyinEditor::updateZhuyin (void)
zhuyin_instance_t * instance = m_instances[index];
size_t len = zhuyin_parse_more_chewings
(instance, section.c_str ());
- bool valid = zhuyin_valid_zhuyin_keys (instance);
- if (!valid) {
- size_t valid_len = zhuyin_get_parsed_input_length (instance);
-
- const gchar * str = NULL;
- zhuyin_get_raw_user_input (instance, &str);
- section = str;
-
- /* hack here: usually only one zhuyin key will have problem,
- so it is safe to just move the cursor. */
- m_cursor -= len - valid_len;
- }
zhuyin_guess_sentence (instance);
new_text += section;
append_offset += section.length ();
+#if 0
/* check whether the last character is tone,
if not part of parsed chewing input,
turn the tone into symbol. */
@@ -142,7 +131,7 @@ ZhuyinEditor::updateZhuyin (void)
}
g_strfreev (symbols);
}
-
+#endif
++index;
}