IMEState // Change marking style for .ofCandidates().
This commit is contained in:
parent
a7e3013a1f
commit
6b22f3d6f1
|
@ -196,12 +196,14 @@ public extension IMEState {
|
||||||
func attributedString(for session: IMKInputController) -> NSAttributedString {
|
func attributedString(for session: IMKInputController) -> NSAttributedString {
|
||||||
switch type {
|
switch type {
|
||||||
case .ofMarking: return data.attributedStringMarking(for: session)
|
case .ofMarking: return data.attributedStringMarking(for: session)
|
||||||
|
case .ofCandidates where cursor != marker: return data.attributedStringMarking(for: session)
|
||||||
|
case .ofCandidates where cursor == marker: break
|
||||||
case .ofAssociates: return data.attributedStringPlaceholder(for: session)
|
case .ofAssociates: return data.attributedStringPlaceholder(for: session)
|
||||||
case .ofSymbolTable:
|
case .ofSymbolTable where displayedText.isEmpty: return data.attributedStringPlaceholder(for: session)
|
||||||
guard !displayedText.isEmpty else { return data.attributedStringPlaceholder(for: session) }
|
case .ofSymbolTable where !displayedText.isEmpty: break
|
||||||
return data.attributedStringNormal(for: session)
|
default: break
|
||||||
default: return data.attributedStringNormal(for: session)
|
|
||||||
}
|
}
|
||||||
|
return data.attributedStringNormal(for: session)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 該參數僅用作輔助判斷。在 InputHandler 內使用的話,必須再檢查 !compositor.isEmpty。
|
/// 該參數僅用作輔助判斷。在 InputHandler 內使用的話,必須再檢查 !compositor.isEmpty。
|
||||||
|
|
Loading…
Reference in New Issue