aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjohnsonj <devnull@localhost>2015-12-08 10:08:05 +1100
committerjohnsonj <devnull@localhost>2015-12-08 10:08:05 +1100
commite44b134b71b11cbbd8abb4173b13cebaaae89ec5 (patch)
tree7941af2ce6d3bdc02daac373201a40b2844d00ea
parent55c62e8a76d75e8e1351aa98fa0364348e46f8cb (diff)
downloadscintilla-mirror-e44b134b71b11cbbd8abb4173b13cebaaae89ec5.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()) {