summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2018-10-17 16:01:29 +0800
committerPeng Wu <alexepico@gmail.com>2018-10-17 16:01:29 +0800
commitf3863de494c7de92f2e18728f0d52fb20828138c (patch)
tree4851bf23de5e9f8a3b69fb9ac6e4222452806b33
parentf93aa7cd0bd1b0db87b6daa234df5a59dde5c766 (diff)
downloadibus-libpinyin-f3863de494c7de92f2e18728f0d52fb20828138c.tar.gz
ibus-libpinyin-f3863de494c7de92f2e18728f0d52fb20828138c.tar.xz
ibus-libpinyin-f3863de494c7de92f2e18728f0d52fb20828138c.zip
fixes Enter handling
-rw-r--r--src/PYPPhoneticEditor.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/PYPPhoneticEditor.cc b/src/PYPPhoneticEditor.cc
index eaff323..00c4f64 100644
--- a/src/PYPPhoneticEditor.cc
+++ b/src/PYPPhoneticEditor.cc
@@ -91,10 +91,12 @@ PhoneticEditor::processFunctionKey (guint keyval, guint keycode, guint modifiers
if (modifiers == 0) { /* no modifiers. */
switch (keyval) {
case IBUS_Return:
- case IBUS_KP_Enter:
- commit (m_text.c_str ());
+ case IBUS_KP_Enter: {
+ Text text (m_text.c_str ());
+ commitText (text);
reset ();
return TRUE;
+ }
case IBUS_BackSpace:
removeCharBefore ();