diff options
author | johnsonj <unknown> | 2017-03-05 16:28:31 +1100 |
---|---|---|
committer | johnsonj <unknown> | 2017-03-05 16:28:31 +1100 |
commit | 26fc47b6fc2445b1d9b4a20eb3ccc79cf2fca315 (patch) | |
tree | 6d4bba51574e708c7c932b81271539f2ad482ea4 /gtk/ScintillaGTK.cxx | |
parent | e17d87205db3b9a3e6bc4b7f14c11d48b48b66f2 (diff) | |
download | scintilla-mirror-26fc47b6fc2445b1d9b4a20eb3ccc79cf2fca315.tar.gz |
For IMEs, do not clear selected text when there is no composition text to show.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rw-r--r-- | gtk/ScintillaGTK.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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<int> indicator = MapImeIndicators(preeditStr.attrs, preeditStr.str); |