ctlIME // Force using vertical candidate when typing kaomoji. (#74)
This commit is contained in:
parent
f43e3f5992
commit
dc041e0a00
|
@ -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
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue