summaryrefslogtreecommitdiffstats
path: root/src/PYPBopomofoEngine.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2018-06-27 11:44:25 +0800
committerPeng Wu <alexepico@gmail.com>2018-06-27 11:44:25 +0800
commit96307d95a49078c7bb645ae60c216cafb431f8a9 (patch)
tree5add047fe558e846fb601502048be7405e4d0aa1 /src/PYPBopomofoEngine.cc
parent76318b525e8dd4635ac628d184dc6186c9bee966 (diff)
downloadibus-libpinyin-96307d95a49078c7bb645ae60c216cafb431f8a9.tar.gz
ibus-libpinyin-96307d95a49078c7bb645ae60c216cafb431f8a9.tar.xz
ibus-libpinyin-96307d95a49078c7bb645ae60c216cafb431f8a9.zip
fixes processKeyEvent method
Diffstat (limited to 'src/PYPBopomofoEngine.cc')
-rw-r--r--src/PYPBopomofoEngine.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/PYPBopomofoEngine.cc b/src/PYPBopomofoEngine.cc
index d13bde6..e2154d1 100644
--- a/src/PYPBopomofoEngine.cc
+++ b/src/PYPBopomofoEngine.cc
@@ -160,10 +160,12 @@ BopomofoEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers)
retval = m_editors[m_input_mode]->processKeyEvent (keyval, keycode, modifiers);
- if (retval)
+ if (retval) {
goto out;
- else
+ } else {
+ m_editors[m_input_mode]->reset ();
m_input_mode = MODE_INIT;
+ }
}
if (G_UNLIKELY (m_input_mode == MODE_INIT &&