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. --- win32/ScintillaWin.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'win32') 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 imeIndicator = MapImeIndicators(imc.GetImeAttributes()); -- cgit v1.2.3