From 9377739727201262b06048e5b0612c4171ade4d9 Mon Sep 17 00:00:00 2001 From: johnsonj Date: Fri, 14 Jul 2023 16:48:58 +1000 Subject: Feature [feature-requests:#1488] Stop aligning IME candidate window to target on Win32 and Qt. --- doc/ScintillaHistory.html | 8 ++++++++ qt/ScintillaEditBase/ScintillaEditBase.cpp | 8 -------- win32/ScintillaWin.cxx | 5 ----- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 503df317e..a766f61c0 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -602,6 +602,14 @@ Bug #2333.
  • + On Win32 and Qt, stop aligning IME candidate window to target. + It is now always aligned to start of composition string. + This undoes part of feature #1300. + Feature #1488, + Bug #2391, + Feature #1300. +
  • +
  • On Qt, for IMEs, update micro focus when selection changes. This may move the location of IME popups to align with the caret.
  • diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp index 5072cd824..2499932b4 100644 --- a/qt/ScintillaEditBase/ScintillaEditBase.cpp +++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp @@ -611,14 +611,6 @@ void ScintillaEditBase::inputMethodEvent(QInputMethodEvent *event) #endif sqt->view.imeCaretBlockOverride = true; } - - // Set Candidate window position again at imeCaret when target input. - const bool targetAny = std::any_of(imeIndicator.begin(), imeIndicator.end(), [](int i) noexcept { - return i == IndicatorTarget; - }); - if (targetAny) - preeditPos = sqt->CurrentPosition(); - sqt->EnsureCaretVisible(); } sqt->ShowCaretAtCurrentPosition(); diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index e38ba6386..b43503615 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1324,11 +1324,6 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { const Sci::Position imeCaretPosDoc = pdoc->GetRelativePositionUTF16(currentPos, imeEndToImeCaretU16); MoveImeCarets(-currentPos + imeCaretPosDoc); - - if (std::find(imeIndicator.begin(), imeIndicator.end(), IndicatorTarget) != imeIndicator.end()) { - // set candidate window left aligned to beginning of target string. - SetCandidateWindowPos(); - } } } -- cgit v1.2.3