IMKHelper // Fix an error while freeing a pointer.
This commit is contained in:
parent
db4ccbb705
commit
f9b3eb6cd4
|
@ -128,7 +128,7 @@ public extension TISInputSource {
|
||||||
kTISPropertyInputSourceIsASCIICapable: kCFBooleanTrue as CFBoolean,
|
kTISPropertyInputSourceIsASCIICapable: kCFBooleanTrue as CFBoolean,
|
||||||
]
|
]
|
||||||
// 返回鍵盤配列清單。
|
// 返回鍵盤配列清單。
|
||||||
var result = TISCreateInputSourceList(dicConditions as CFDictionary, true).takeRetainedValue() as? [TISInputSource] ?? .init()
|
var result = TISCreateInputSourceList(dicConditions as CFDictionary, true)?.takeRetainedValue() as? [TISInputSource] ?? .init()
|
||||||
if onlyASCII {
|
if onlyASCII {
|
||||||
result = result.filter { $0.scriptCode == 0 }
|
result = result.filter { $0.scriptCode == 0 }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue