diff options
author | Peng Wu <alexepico@gmail.com> | 2022-11-24 18:23:46 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2022-11-25 15:43:02 +0800 |
commit | d948bf58ddb39da8a6988962a73ba1f6dbf238fa (patch) | |
tree | 60943b0287a3d288a1b6786430e5fff89c127d12 | |
parent | f7cdfd73867ad85f97eb87dced5ca32be4e99ab3 (diff) | |
download | ibus-libpinyin-d948bf58ddb39da8a6988962a73ba1f6dbf238fa.tar.gz |
Fix English symbols
-rw-r--r-- | src/PYEnglishEditor.h | 2 | ||||
-rw-r--r-- | src/PYPPinyinEngine.cc | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/PYEnglishEditor.h b/src/PYEnglishEditor.h index 5685d24..5d2de51 100644 --- a/src/PYEnglishEditor.h +++ b/src/PYEnglishEditor.h @@ -29,7 +29,7 @@ namespace PY { class EnglishDatabase; -static const std::string EnglishSymbols = "`~!@*()+[]{}\\|;':\"/<>?"; +static const std::string EnglishSymbols = "`~!@*()+[]{}\\|':\"/<>?"; class EnglishEditor : public Editor { private: diff --git a/src/PYPPinyinEngine.cc b/src/PYPPinyinEngine.cc index 5e13b56..6385772 100644 --- a/src/PYPPinyinEngine.cc +++ b/src/PYPPinyinEngine.cc @@ -369,7 +369,10 @@ PinyinEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers) // for english mode switch with symbol key if (keyval <= std::numeric_limits<char>::max() && g_unichar_ispunct (keyval) && - EnglishSymbols.find(keyval) != std::string::npos && + (EnglishSymbols.find(keyval) != std::string::npos || + /* For double pinyin, ";" is used. */ + (!PinyinConfig::instance ().doublePinyin () && + IBUS_semicolon == keyval)) && m_input_mode == MODE_INIT && PinyinConfig::instance ().englishInputMode ()) { String text; |