SessionCtl // Optimize selectionKeys().

This commit is contained in:
ShikiSuen 2023-06-20 11:45:11 +08:00
parent e6cb5974a7
commit 7d899b4af1
1 changed files with 3 additions and 2 deletions

View File

@ -98,8 +98,9 @@ extension SessionCtl: CtlCandidateDelegate {
} }
public var selectionKeys: String { public var selectionKeys: String {
// `%quick` 1234567890 // `%quick` 使 1234567890
if state.type == .ofInputting, state.isCandidateContainer { cassetteQuick: if state.type == .ofInputting, state.isCandidateContainer {
guard PrefMgr.shared.cassetteEnabled else { break cassetteQuick }
guard let cinCandidateKey = LMMgr.currentLM.cassetteSelectionKey, guard let cinCandidateKey = LMMgr.currentLM.cassetteSelectionKey,
CandidateKey.validate(keys: cinCandidateKey) == nil CandidateKey.validate(keys: cinCandidateKey) == nil
else { else {