diff options
| author | Peng Wu <alexepico@gmail.com> | 2023-04-07 12:07:12 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2023-04-07 12:07:12 +0800 |
| commit | 82e7cb0d8e00720a3abfb833327e37ee132016be (patch) | |
| tree | fa3eff12b7c94cf46cd33e51702ae39a87ce8646 /src | |
| parent | efd72e9b24632eb528b9b4cd4a0dc71364e1708e (diff) | |
| download | ibus-libpinyin-82e7cb0d8e00720a3abfb833327e37ee132016be.tar.gz ibus-libpinyin-82e7cb0d8e00720a3abfb833327e37ee132016be.tar.xz ibus-libpinyin-82e7cb0d8e00720a3abfb833327e37ee132016be.zip | |
Fix English mode in Full Pinyin
Diffstat (limited to 'src')
| -rw-r--r-- | src/PYEnglishEditor.h | 2 | ||||
| -rw-r--r-- | src/PYPPinyinEngine.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/PYEnglishEditor.h b/src/PYEnglishEditor.h index 5d2de51..780c8c7 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 6385772..e0c043c 100644 --- a/src/PYPPinyinEngine.cc +++ b/src/PYPPinyinEngine.cc @@ -370,6 +370,9 @@ PinyinEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers) if (keyval <= std::numeric_limits<char>::max() && g_unichar_ispunct (keyval) && (EnglishSymbols.find(keyval) != std::string::npos || + /* For full pinyin, "'" is used. */ + (PinyinConfig::instance ().doublePinyin () && + IBUS_apostrophe == keyval) || /* For double pinyin, ";" is used. */ (!PinyinConfig::instance ().doublePinyin () && IBUS_semicolon == keyval)) && |
