aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
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
commit29165cf68134ce1c0e279dfed6e524523b1215b5 (patch)
tree1ec47cdadeaa84fd66244655653590914636fbb0 /win32/ScintillaWin.cxx
parentfd1c792acd7c13f6bfe6ce3957e8516c2eae1216 (diff)
downloadscintilla-mirror-29165cf68134ce1c0e279dfed6e524523b1215b5.tar.gz
When losing focus, complete any IME composition.
From johnsonj.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx6
1 files changed, 6 insertions, 0 deletions
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;