From d273fb8b169cd9b4b7f6a24ff9b5f60e886376f4 Mon Sep 17 00:00:00 2001 From: johnsonj Date: Wed, 17 Jul 2019 15:46:13 +1000 Subject: Feature [feature-requests:#1300] part 4. Align candidate window to target part of composition text. --- doc/ScintillaHistory.html | 1 + win32/ScintillaWin.cxx | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index f75dfb496..3a144951a 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -571,6 +571,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 e19dca8b5..487b2bc02 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1128,6 +1128,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