SessionCtl // Optimize commission in resetInputHandler(). (#199)

This commit is contained in:
ShikiSuen 2022-10-27 12:34:04 +08:00
parent 5465fe16d2
commit ae49ee81f3
1 changed files with 4 additions and 6 deletions

View File

@ -172,12 +172,10 @@ extension SessionCtl {
inputHandler.composer.clear() inputHandler.composer.clear()
switchState(inputHandler.generateStateOfInputting()) switchState(inputHandler.generateStateOfInputting())
} }
let isSecureMode = PrefMgr.shared.clientsIMKTextInputIncapable.contains(clientBundleIdentifier) // IMKTextInput
if state.hasComposition, !isSecureMode { // Shift+Delete
/// 調 switchState(IMEState.ofEmpty())
switchState(IMEState.ofCommitting(textToCommit: state.displayedText)) // switchState(isSecureMode ? IMEState.ofAbortion() : IMEState.ofEmpty())
}
switchState(isSecureMode ? IMEState.ofAbortion() : IMEState.ofEmpty())
} }
} }