diff options
author | Peng Wu <alexepico@gmail.com> | 2018-09-14 14:48:18 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2018-09-14 14:48:18 +0800 |
commit | 78c7636176951a8528dc9e2793d32a42680e434a (patch) | |
tree | 6db80103d44e32f49fbe6429a4b0e831cd52c860 /src/PYPPinyinEngine.cc | |
parent | f4d792986e5d52e6104d0e9ab159a8197608667d (diff) | |
download | ibus-libpinyin-78c7636176951a8528dc9e2793d32a42680e434a.tar.gz ibus-libpinyin-78c7636176951a8528dc9e2793d32a42680e434a.tar.xz ibus-libpinyin-78c7636176951a8528dc9e2793d32a42680e434a.zip |
commit m_text when switch input mode
Diffstat (limited to 'src/PYPPinyinEngine.cc')
-rw-r--r-- | src/PYPPinyinEngine.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/PYPPinyinEngine.cc b/src/PYPPinyinEngine.cc index 938c547..0c71ca3 100644 --- a/src/PYPPinyinEngine.cc +++ b/src/PYPPinyinEngine.cc @@ -164,8 +164,12 @@ PinyinEngine::processAccelKeyEvent (guint keyval, guint keycode, } if (triggered) { - if (!m_editors[MODE_INIT]->text ().empty ()) + if (!m_editors[MODE_INIT]->text ().empty ()) { + Text text (m_editors[MODE_INIT]->text ()); + commitText (text); m_editors[MODE_INIT]->reset (); + } + if (!m_editors[MODE_SUGGESTION]->text ().empty ()) m_editors[MODE_SUGGESTION]->reset (); m_props.toggleModeChinese (); |