From e27436cf52af98321cab1b288fc7c215af568277 Mon Sep 17 00:00:00 2001 From: johnsonj Date: Wed, 17 Jul 2019 15:37:49 +1000 Subject: Feature [feature-requests:#1300] part 3. Stop candidate window moving while typing. --- doc/ScintillaHistory.html | 1 + win32/ScintillaWin.cxx | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 18d6dfe01..f75dfb496 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -570,6 +570,7 @@ On Win32, stop the IME candidate window moving unnecessarily and position it better.
Stop candidate window overlapping composition text and taskbar.
Position candidate window closer to composition text.
+ Stop candidate window moving while typing.
Bug #2120. Feature #1300. diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 55606fe07..e19dca8b5 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1100,8 +1100,12 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { return 0; } - if (initialCompose) + if (initialCompose) { ClearBeforeTentativeStart(); + } + + // Set candidate window left aligned to beginning of preedit string. + SetCandidateWindowPos(); pdoc->TentativeStart(); // TentativeActive from now on. std::vector imeIndicator = MapImeIndicators(imc.GetImeAttributes()); @@ -1131,7 +1135,6 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { AddWString(imc.GetCompositionString(GCS_RESULTSTR), CharacterSource::imeResult); } EnsureCaretVisible(); - SetCandidateWindowPos(); ShowCaretAtCurrentPosition(); return 0; } -- cgit v1.2.3