From c5b3083b48200ca1397cc4395e3d8f4025a84260 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 11 Mar 2023 17:01:03 +0800 Subject: [PATCH] InputHandler // Use updatePopupDisplayWithCursor() if needed. --- Source/Modules/InputHandler_Core.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Modules/InputHandler_Core.swift b/Source/Modules/InputHandler_Core.swift index f0b657f1..f519aac8 100644 --- a/Source/Modules/InputHandler_Core.swift +++ b/Source/Modules/InputHandler_Core.swift @@ -69,6 +69,7 @@ public protocol InputHandlerDelegate { func candidateController() -> CtlCandidateProtocol? func candidateSelectionConfirmedByInputHandler(at index: Int) func setInlineDisplayWithCursor() + func updatePopupDisplayWithCursor() func performUserPhraseOperation(addToFilter: Bool) -> Bool } @@ -430,6 +431,9 @@ public class InputHandler: InputHandlerProtocol { theState.data.cursor = inputting.cursor delegate.state = theState // 直接就地取代,不經過 switchState 處理,免得選字窗被重新載入。 delegate.setInlineDisplayWithCursor() + if delegate.clientMitigationLevel >= 2, theState.hasComposition { + delegate.updatePopupDisplayWithCursor() + } } // MARK: - Extracted methods and functions (Tekkon).