From 0423ce727c977d3aabe6ffeddca2b49c565af905 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 11 Mar 2023 16:59:56 +0800 Subject: [PATCH] SessionCtl // Implement updatePopupDisplayWithCursor(). --- Source/Modules/SessionCtl_HandleStates.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Modules/SessionCtl_HandleStates.swift b/Source/Modules/SessionCtl_HandleStates.swift index e2a59249..bfab44fd 100644 --- a/Source/Modules/SessionCtl_HandleStates.swift +++ b/Source/Modules/SessionCtl_HandleStates.swift @@ -87,11 +87,16 @@ public extension SessionCtl { showCandidates() } // 浮動組字窗的顯示判定 - if newState.hasComposition, clientMitigationLevel >= 2 { + updatePopupDisplayWithCursor() + } + + /// 浮動組字窗的顯示判定 + func updatePopupDisplayWithCursor() { + if state.hasComposition, clientMitigationLevel >= 2 { updateVerticalTypingStatus() popupCompositionBuffer.isTypingDirectionVertical = isVerticalTyping popupCompositionBuffer.show( - state: newState, at: lineHeightRect(zeroCursor: true).origin + state: state, at: lineHeightRect(zeroCursor: true).origin ) } else { popupCompositionBuffer.hide()