InputHandler // Constantiate a never-mutate var.

This commit is contained in:
ShikiSuen 2023-06-19 21:38:58 +08:00
parent c2b9abaa24
commit a6ccb51172
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ extension InputHandler {
} }
var index: Int? var index: Int?
var matched: String = [.ofAssociates, .ofInputting].contains(state.type) let matched: String = [.ofAssociates, .ofInputting].contains(state.type)
? input.inputTextIgnoringModifiers ?? "" : input.text ? input.inputTextIgnoringModifiers ?? "" : input.text
checkSelectionKey: for keyPair in delegate.selectionKeys.enumerated() { checkSelectionKey: for keyPair in delegate.selectionKeys.enumerated() {
guard matched.lowercased() == keyPair.element.lowercased() else { continue } guard matched.lowercased() == keyPair.element.lowercased() else { continue }