aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjohnsonj <devnull@localhost>2015-12-07 11:13:48 +1100
committerjohnsonj <devnull@localhost>2015-12-07 11:13:48 +1100
commit55c62e8a76d75e8e1351aa98fa0364348e46f8cb (patch)
tree6fc48f754a5c3d7e4be674e0f3edcfee4ca9ea2d
parent1e1788d88e6134f533492a1663d133f4c45c0ff2 (diff)
downloadscintilla-mirror-55c62e8a76d75e8e1351aa98fa0364348e46f8cb.tar.gz
Cancel IME composition for read-only documents.
-rw-r--r--win32/ScintillaWin.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 4756a89af..945e9cff0 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1005,7 +1005,10 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) {
// Great thanks for my foreruners, jiniya and BLUEnLIVE.
IMContext imc(MainHWND());
- if (!imc.hIMC) {
+ if (!imc.hIMC)
+ return 0;
+ if (pdoc->IsReadOnly()) {
+ ::ImmNotifyIME(imc.hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
return 0;
}