ctlIME // Force using vertical candidate when typing kaomoji. (#74)

This commit is contained in:
ShikiSuen 2022-05-07 01:50:00 +08:00 committed by GitHub
parent f43e3f5992
commit dc041e0a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 4 deletions

View File

@ -407,11 +407,20 @@ extension ctlInputMethod {
candidates.sort { candidates.sort {
$0.count > $1.count $0.count > $1.count
} }
if let candidateFirst = candidates.first {
// If there is a candidate which is too long, we use the vertical // If there is a candidate which is too long, we use the vertical
// candidate list window automatically. // candidate list window automatically.
if candidates.first?.count ?? 0 > 8 { if candidateFirst.count > 8 {
// return true // // return true //
} }
}
// 使
// for
for candidate in candidates {
if ["顏文字", "颜文字"].contains(candidate), mgrPrefs.symbolInputEnabled {
return true
}
}
return false return false
}() }()