aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-07-10 10:24:19 +1000
committerNeil <nyamatongwe@gmail.com>2014-07-10 10:24:19 +1000
commita5bca4ec529ad0f3a368d8a53f6a40b244dfc00a (patch)
tree1c3a89b644effa8ecdaebe10878b8f0eb28ad8f5
parent99b10e08e875d34e73b43743bda747bc17e76c9b (diff)
downloadscintilla-mirror-a5bca4ec529ad0f3a368d8a53f6a40b244dfc00a.tar.gz
When losing focus, complete any IME composition.
From johnsonj.
-rw-r--r--doc/ScintillaHistory.html1
-rw-r--r--win32/ScintillaWin.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index ecb9f4a0a..52de6d21b 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -449,6 +449,7 @@
<td>nkmathew</td>
<td>Andreas Tscharner</td>
<td>Lee Wilmott</td>
+ <td>johnsonj</td>
</tr>
</table>
<p>
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 38e85a7a8..e7aae8c3b 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1106,6 +1106,12 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
SetFocusState(false);
DestroySystemCaret();
}
+ // Explicitly complete any IME composition
+ HIMC hIMC = ImmGetContext(MainHWND());
+ if (hIMC) {
+ ::ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE, 0);
+ ::ImmReleaseContext(MainHWND(), hIMC);
+ }
}
break;