From e3a3ea3e7b81d9ccf19b1a8f565bbb66a997d3a9 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Wed, 11 Mar 2020 15:58:58 +1100 Subject: Backport: Handle Japanese IME input when both GCS_COMPSTR and GCS_RESULTSTR set. Backport of changeset 8002:92d3ec579869. --- win32/ScintillaWin.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 32f913dce..784bf9e49 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1126,6 +1126,10 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { view.imeCaretBlockOverride = false; + if (lParam & GCS_RESULTSTR) { + AddWString(imc.GetCompositionString(GCS_RESULTSTR), CharacterSource::imeResult); + } + if (lParam & GCS_COMPSTR) { const std::wstring wcs = imc.GetCompositionString(GCS_COMPSTR); if ((wcs.size() == 0) || (wcs.size() >= maxLenInputIME)) { @@ -1186,8 +1190,6 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { if (KoreanIME()) { view.imeCaretBlockOverride = true; } - } else if (lParam & GCS_RESULTSTR) { - AddWString(imc.GetCompositionString(GCS_RESULTSTR), CharacterSource::imeResult); } EnsureCaretVisible(); ShowCaretAtCurrentPosition(); -- cgit v1.2.3