From ba826379b8cf8f61d4243b7957e81989d57896db Mon Sep 17 00:00:00 2001 From: johnsonj Date: Wed, 17 Jul 2019 15:46:13 +1000 Subject: Backport: Feature [feature-requests:#1300] part 4. Align candidate window to target part of composition text. Backport of changeset 7686:7761c6b46433. --- doc/ScintillaHistory.html | 1 + win32/ScintillaWin.cxx | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index e299e9c7a..fb4252565 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -557,6 +557,7 @@ Stop candidate window overlapping composition text and taskbar.
Position candidate window closer to composition text.
Stop candidate window moving while typing.
+ Align candidate window to target part of composition text.
Bug #2120. Feature #1300. diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index b70934a80..67cbd2d79 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1132,6 +1132,11 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { MoveImeCarets(- CurrentPosition() + imeCaretPosDoc); + if (std::find(imeIndicator.begin(), imeIndicator.end(), SC_INDICATOR_TARGET) != imeIndicator.end()) { + // set candidate window left aligned to beginning of target string. + SetCandidateWindowPos(); + } + if (KoreanIME()) { view.imeCaretBlockOverride = true; } -- cgit v1.2.3