From 3bf5b1fcf2315a1ce180ad69eb6bb1e57be37ca5 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 7 Jul 2020 00:31:11 +0800 Subject: ... --- src/win/native/InputMethod.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/win/native/InputMethod.cpp') 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(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); -- cgit v1.2.3