From e1d2f5482591105aaa1fdc7dd96fb631eb79500f Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 24 Jul 2022 11:18:18 +0800 Subject: [PATCH] KeyHandler // Filter empty SCPC candidates on commit. --- Source/Modules/ControllerModules/KeyHandler_States.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_States.swift b/Source/Modules/ControllerModules/KeyHandler_States.swift index 77c15b65..4bd97370 100644 --- a/Source/Modules/ControllerModules/KeyHandler_States.swift +++ b/Source/Modules/ControllerModules/KeyHandler_States.swift @@ -329,7 +329,7 @@ extension KeyHandler { ) if candidateState.candidates.count == 1 { clear() - if let candidateToCommit: (String, String) = candidateState.candidates.first { + if let candidateToCommit: (String, String) = candidateState.candidates.first, !candidateToCommit.1.isEmpty { stateCallback(InputState.Committing(textToCommit: candidateToCommit.1)) stateCallback(InputState.Empty()) } else {