From 26fc47b6fc2445b1d9b4a20eb3ccc79cf2fca315 Mon Sep 17 00:00:00 2001 From: johnsonj Date: Sun, 5 Mar 2017 16:28:31 +1100 Subject: For IMEs, do not clear selected text when there is no composition text to show. --- gtk/ScintillaGTK.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 1da8ebd4e..a9335e14e 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2323,12 +2323,13 @@ void ScintillaGTK::PreeditChangedInlineThis() { view.imeCaretBlockOverride = false; // If backspace. + bool initialCompose = false; if (pdoc->TentativeActive()) { pdoc->TentativeUndo(); } else { // No tentative undo means start of this composition so // fill in any virtual spaces. - ClearBeforeTentativeStart(); + initialCompose = true; } PreEditString preeditStr(im_context); @@ -2345,6 +2346,8 @@ void ScintillaGTK::PreeditChangedInlineThis() { return; } + if (initialCompose) + ClearBeforeTentativeStart(); pdoc->TentativeStart(); // TentativeActive() from now on std::vector indicator = MapImeIndicators(preeditStr.attrs, preeditStr.str); -- cgit v1.2.3