summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2018-11-30 10:31:17 +0800
committerPeng Wu <alexepico@gmail.com>2018-11-30 10:31:17 +0800
commit664be06dd071779211ef85b23ae8e7561ea152c1 (patch)
treeb16516e80782483fbb87cf27f5756e58792b307d
parent0b7002ff0c74c4ae4eed3d016e7e9bf6ebb27191 (diff)
downloadibus-libzhuyin-664be06dd071779211ef85b23ae8e7561ea152c1.tar.gz
ibus-libzhuyin-664be06dd071779211ef85b23ae8e7561ea152c1.tar.xz
ibus-libzhuyin-664be06dd071779211ef85b23ae8e7561ea152c1.zip
fixes insertSymbol method
-rw-r--r--src/ZYString.h2
-rw-r--r--src/ZYZPhoneticEditor.cc5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ZYString.h b/src/ZYString.h
index ebb8438..f90a3aa 100644
--- a/src/ZYString.h
+++ b/src/ZYString.h
@@ -33,8 +33,6 @@ public:
String () : std::string () { }
String (const gchar *str) : std::string (str) { }
String (const std::string &str) : std::string (str) { }
- /* TODO: remove the following line later. */
- G_DEPRECATED String (gint len) : std::string () { reserve (len); }
String (const gchar ch) : std::string (1, ch) { }
String & printf (const gchar *fmt, ...)
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc
index bf337f7..5c95a22 100644
--- a/src/ZYZPhoneticEditor.cc
+++ b/src/ZYZPhoneticEditor.cc
@@ -948,8 +948,9 @@ PhoneticEditor::insertSymbol (guint keyval)
if (is_full_width_symbol (keyval)) {
if (is_special_symbol (keyval)) {
- String choice;
- assert (convert_special_symbol (keyval, choice));
+ String choice = keyval;
+ if (m_props.modeFullWidth ())
+ assert (convert_special_symbol (keyval, choice));
String lookup;
int ch = find_lookup_key (choice);