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 | |
parent | e17d87205db3b9a3e6bc4b7f14c11d48b48b66f2 (diff) | |
download | scintilla-mirror-26fc47b6fc2445b1d9b4a20eb3ccc79cf2fca315.tar.gz |
For IMEs, do not clear selected text when there is no composition text to show.
-rw-r--r-- | doc/ScintillaHistory.html | 3 | ||||
-rw-r--r-- | gtk/ScintillaGTK.cxx | 5 | ||||
-rw-r--r-- | qt/ScintillaEditBase/ScintillaEditBase.cpp | 5 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 5 |
4 files changed, 15 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index ab03e7f3e..764d1eeb3 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -527,6 +527,9 @@ Released 19 February 2017. </li> <li> + For IMEs, do not clear selected text when there is no composition text to show. + </li> + <li> Fix to stream selection mode when moving caret up or down. <a href="http://sourceforge.net/p/scintilla/bugs/1905/">Bug #1905</a>. </li> 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); diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp index eb51ef1d1..9059e6344 100644 --- a/qt/ScintillaEditBase/ScintillaEditBase.cpp +++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp @@ -525,12 +525,13 @@ void ScintillaEditBase::inputMethodEvent(QInputMethodEvent *event) return; } + bool initialCompose = false; if (sqt->pdoc->TentativeActive()) { sqt->pdoc->TentativeUndo(); } else { // No tentative undo means start of this composition so // Fill in any virtual spaces. - sqt->ClearBeforeTentativeStart(); + initialCompose = true; } sqt->view.imeCaretBlockOverride = false; @@ -557,6 +558,8 @@ void ScintillaEditBase::inputMethodEvent(QInputMethodEvent *event) return; } + if (initialCompose) + sqt->ClearBeforeTentativeStart(); sqt->pdoc->TentativeStart(); // TentativeActive() from now on. std::vector<int> imeIndicator = MapImeIndicators(event); diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 265789330..ae20ac2e9 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1061,12 +1061,13 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { return 0; } + 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; } view.imeCaretBlockOverride = false; @@ -1078,6 +1079,8 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { return 0; } + if (initialCompose) + ClearBeforeTentativeStart(); pdoc->TentativeStart(); // TentativeActive from now on. std::vector<int> imeIndicator = MapImeIndicators(imc.GetImeAttributes()); |