aboutsummaryrefslogtreecommitdiff
path: root/src/win/native/InputMethod.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-07-07 00:31:11 +0800
committercrupest <crupest@outlook.com>2020-07-07 00:31:11 +0800
commit3bf5b1fcf2315a1ce180ad69eb6bb1e57be37ca5 (patch)
tree722b5b5d808ce0ead4bc497dd910e081fa601656 /src/win/native/InputMethod.cpp
parentcb241b7289abfc10111d3180def55ca1fbb2edb4 (diff)
downloadcru-3bf5b1fcf2315a1ce180ad69eb6bb1e57be37ca5.tar.gz
cru-3bf5b1fcf2315a1ce180ad69eb6bb1e57be37ca5.tar.bz2
cru-3bf5b1fcf2315a1ce180ad69eb6bb1e57be37ca5.zip
...
Diffstat (limited to 'src/win/native/InputMethod.cpp')
-rw-r--r--src/win/native/InputMethod.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/win/native/InputMethod.cpp b/src/win/native/InputMethod.cpp
index 5fc6c934..f9a40ab4 100644
--- a/src/win/native/InputMethod.cpp
+++ b/src/win/native/InputMethod.cpp
@@ -247,7 +247,7 @@ void WinInputMethodContext::OnWindowNativeMessage(
switch (message.msg) {
case WM_CHAR: {
const auto c = static_cast<char16_t>(message.w_param);
- if (IsSurrogatePair(c)) {
+ if (IsUtf16SurrogatePairCodeUnit(c)) {
// I don't think this will happen because normal key strike without ime
// should only trigger ascci character. If it is a charater from
// supplementary planes, it should be handled with ime messages.
@@ -264,6 +264,8 @@ void WinInputMethodContext::OnWindowNativeMessage(
case WM_IME_COMPOSITION: {
composition_event_.Raise(nullptr);
auto composition_text = GetCompositionText();
+ // log::TagDebug(log_tag, u"WM_IME_COMPOSITION composition text:\n{}",
+ // composition_text);
if (message.l_param & GCS_RESULTSTR) {
auto result_string = GetResultString();
text_event_.Raise(result_string);