summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-10-09 10:23:14 +0800
committerPeng Wu <alexepico@gmail.com>2016-10-09 10:37:37 +0800
commit3ca3407c092edd7b967baa983f3ff32a0f87bbf3 (patch)
treeb6abf9d015885af428cc5fe89def754c2896b43d
parent805436ee90b1fe817e119c22462db4f89c34bc67 (diff)
downloadibus-libzhuyin-3ca3407c092edd7b967baa983f3ff32a0f87bbf3.tar.gz
ibus-libzhuyin-3ca3407c092edd7b967baa983f3ff32a0f87bbf3.tar.xz
ibus-libzhuyin-3ca3407c092edd7b967baa983f3ff32a0f87bbf3.zip
fixes Chinese full/half width mode
-rw-r--r--src/ZYZPhoneticEditor.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc
index 26e17a6..b6afe17 100644
--- a/src/ZYZPhoneticEditor.cc
+++ b/src/ZYZPhoneticEditor.cc
@@ -960,6 +960,21 @@ PhoneticEditor::insertSymbol (guint keyval)
{
/* for symbols. */
if (is_full_width_symbol (keyval)) {
+
+ if (is_special_symbol (keyval)) {
+ String choice = (gchar) keyval;
+ assert (convert_special_symbol (keyval, choice));
+
+ String lookup;
+ int ch = find_lookup_key (choice);
+ if (ch != 0)
+ lookup = (gchar) ch;
+
+ insert_symbol (m_text, m_cursor++, BUILTIN_SYMBOL_TYPE,
+ lookup, choice);
+ return TRUE;
+ }
+
if (m_props.modeFullWidth ()) {
String choice;
assert (convert_full_width_symbol (keyval, choice));
@@ -973,9 +988,6 @@ PhoneticEditor::insertSymbol (guint keyval)
lookup, choice);
} else {
String choice = (gchar) keyval;
- if (is_special_symbol (keyval))
- convert_special_symbol (keyval, choice);
-
insert_symbol (m_text, m_cursor++, BUILTIN_SYMBOL_TYPE,
"", choice);
}