diff options
author | johnsonj <devnull@localhost> | 2015-12-07 11:13:48 +1100 |
---|---|---|
committer | johnsonj <devnull@localhost> | 2015-12-07 11:13:48 +1100 |
commit | 55c62e8a76d75e8e1351aa98fa0364348e46f8cb (patch) | |
tree | 6fc48f754a5c3d7e4be674e0f3edcfee4ca9ea2d | |
parent | 1e1788d88e6134f533492a1663d133f4c45c0ff2 (diff) | |
download | scintilla-mirror-55c62e8a76d75e8e1351aa98fa0364348e46f8cb.tar.gz |
Cancel IME composition for read-only documents.
-rw-r--r-- | win32/ScintillaWin.cxx | 5 |
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; } |