aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjohnsonj <unknown>2015-12-08 10:08:05 +1100
committerjohnsonj <unknown>2015-12-08 10:08:05 +1100
commita36965492bd53b77859a8e5df0a482ea3ec9f9dd (patch)
tree510984e487e818273676888a44fc1a9264b9ee50
parent14cbdf2fef83d507f1ca9a107f61e621c6cd2276 (diff)
downloadscintilla-mirror-a36965492bd53b77859a8e5df0a482ea3ec9f9dd.tar.gz
Cancel IME composition for read-only documents.
-rw-r--r--gtk/ScintillaGTK.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 9977f0db0..0d8943826 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -2434,6 +2434,11 @@ void ScintillaGTK::PreeditChangedInlineThis() {
// Copy & paste by johnsonj with a lot of helps of Neil
// Great thanks for my foreruners, jiniya and BLUEnLIVE
try {
+ if (pdoc->IsReadOnly()) {
+ gtk_im_context_reset(im_context);
+ return;
+ }
+
view.imeCaretBlockOverride = false; // If backspace.
if (pdoc->TentativeActive()) {