From 8216497382b90645c296f52736f8ba6e066028cc Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 13 Nov 2022 18:42:05 +0800 Subject: [PATCH] SessionCtl // Remove duplicated commissions on deactivation. --- Source/Modules/SessionCtl_HandleStates.swift | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Source/Modules/SessionCtl_HandleStates.swift b/Source/Modules/SessionCtl_HandleStates.swift index 604507b9..d71b4802 100644 --- a/Source/Modules/SessionCtl_HandleStates.swift +++ b/Source/Modules/SessionCtl_HandleStates.swift @@ -45,12 +45,8 @@ extension SessionCtl { ctlCandidateCurrent.visible = false popupCompositionBuffer.hide() tooltipInstance.hide() - if previous.hasComposition { - commit(text: previous.displayedText) - } - // clearInlineDisplay() // 不需要,否則會觸發無限迴圈。 - // 最後一道保險 - inputHandler.clear() + // 這裡移除一些處理,轉而交給 commitComposition() 代為執行。 + // 這裡不需要 clearInlineDisplay() ,否則會觸發無限迴圈。 // 特殊處理:deactivateServer() 可能會遲於另一個客體會話的 activateServer() 執行。 // 雖然所有在這個函式內影響到的變數都改為動態變數了(不會出現跨副本波及的情況), // 但 IMKCandidates 是有內部共用副本的、會被波及。