From d1bd34ee43f37e2e99d7617847eeb056dc939500 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 19 Oct 2022 01:59:06 +0800 Subject: [PATCH] SessionCtl // Show non-empty tooltip on .ofEmpty() state. --- Source/Modules/SessionCtl_HandleStates.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/Modules/SessionCtl_HandleStates.swift b/Source/Modules/SessionCtl_HandleStates.swift index 3cf70906..60f461a9 100644 --- a/Source/Modules/SessionCtl_HandleStates.swift +++ b/Source/Modules/SessionCtl_HandleStates.swift @@ -72,22 +72,19 @@ extension SessionCtl { default: break innerCircle } ctlCandidateCurrent.visible = false - tooltipInstance.hide() // 全專案用以判斷「.Abortion」的地方僅此一處。 if previous.hasComposition, ![.ofAbortion, .ofCommitting].contains(newState.type) { commit(text: previous.displayedText) } - // 在這裡手動再取消一次選字窗與工具提示的顯示,可謂雙重保險。 - tooltipInstance.hide() + showTooltip(newState.tooltip) // 會在工具提示為空的時候自動消除顯示。 clearInlineDisplay() // 最後一道保險 inputHandler.clear() case .ofInputting: ctlCandidateCurrent.visible = false - tooltipInstance.hide() commit(text: newState.textToCommit) setInlineDisplayWithCursor() - showTooltip(newState.tooltip) + showTooltip(newState.tooltip) // 會在工具提示為空的時候自動消除顯示。 case .ofMarking: ctlCandidateCurrent.visible = false setInlineDisplayWithCursor()