From dc75148c8cae314bb7255d5ea7bf2a2516b4741c Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 13 Feb 2023 12:36:53 +0800 Subject: [PATCH] SessionCtl // Don't commit() if .ofInputting() has nothing to commit. --- Source/Modules/SessionCtl_HandleStates.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/SessionCtl_HandleStates.swift b/Source/Modules/SessionCtl_HandleStates.swift index c0bf9eb3..fc5d1493 100644 --- a/Source/Modules/SessionCtl_HandleStates.swift +++ b/Source/Modules/SessionCtl_HandleStates.swift @@ -73,7 +73,7 @@ public extension SessionCtl { inputHandler?.clear() case .ofInputting: candidateUI?.visible = false - commit(text: newState.textToCommit) + if !newState.textToCommit.isEmpty { commit(text: newState.textToCommit) } setInlineDisplayWithCursor() // 會在工具提示為空的時候自動消除顯示。 showTooltip(newState.tooltip, duration: newState.tooltipDuration)