aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZufu Liu <unknown>2020-03-11 15:58:58 +1100
committerZufu Liu <unknown>2020-03-11 15:58:58 +1100
commite3a3ea3e7b81d9ccf19b1a8f565bbb66a997d3a9 (patch)
treeb6b2f14d29cbd3d183b4d9b9954fbacdd788dd0e
parent2027253b9bb392684e15d5ba5db6b1f3b9fa1e39 (diff)
downloadscintilla-mirror-e3a3ea3e7b81d9ccf19b1a8f565bbb66a997d3a9.tar.gz
Backport: Handle Japanese IME input when both GCS_COMPSTR and GCS_RESULTSTR set.
Backport of changeset 8002:92d3ec579869.
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--win32/ScintillaWin.cxx6
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 36b002bf5..d3a8be098 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -603,6 +603,10 @@
<a href="https://sourceforge.net/p/scintilla/bugs/2138/">Bug #2138</a>.
</li>
<li>
+ On Win32 fix handling Japanese IME input when both GCS_COMPSTR and
+ GCS_RESULTSTR set.
+ </li>
+ <li>
Improve IME behaviour on GTK.
Set candidate position for windowed IME.
Improve location of candidate window.
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();