From 14cbdf2fef83d507f1ca9a107f61e621c6cd2276 Mon Sep 17 00:00:00 2001 From: johnsonj Date: Mon, 7 Dec 2015 11:13:48 +1100 Subject: Cancel IME composition for read-only documents. --- win32/ScintillaWin.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3