Repo // Refine `%quick` experiences with IMKCandidates.
This commit is contained in:
parent
723437d085
commit
7561096d0d
|
@ -276,7 +276,7 @@ extension InputHandler {
|
|||
fetched = fetched.deduplicated.filter { $0.description != currentLM.nullCandidateInCassette }
|
||||
}
|
||||
result.candidates = fetched.enumerated().map {
|
||||
(keyArray: [$0.offset.description], value: $0.element.description)
|
||||
(keyArray: [($0.offset + 1).description], value: $0.element.description)
|
||||
}
|
||||
}
|
||||
delegate.switchState(result)
|
||||
|
|
|
@ -512,7 +512,7 @@ extension InputHandler {
|
|||
fetched = fetched.deduplicated.filter { $0.description != currentLM.nullCandidateInCassette }
|
||||
}
|
||||
result.candidates = fetched.enumerated().map {
|
||||
(keyArray: [$0.offset.description], value: $0.element.description)
|
||||
(keyArray: [($0.offset + 1).description], value: $0.element.description)
|
||||
}
|
||||
}
|
||||
delegate.switchState(result)
|
||||
|
|
|
@ -97,6 +97,9 @@ public extension SessionCtl {
|
|||
var singleLine = isVerticalTyping || PrefMgr.shared.candidateWindowShowOnlyOneLine
|
||||
singleLine = singleLine || isInputtingWithCandidates
|
||||
(candidateUI as? CtlCandidateTDK)?.maxLinesPerPage = singleLine ? 1 : 4
|
||||
if isInputtingWithCandidates, candidateLayout == .horizontal {
|
||||
(candidateUI as? CtlCandidateIMK)?.setPanelType(kIMKSingleRowSteppingCandidatePanel)
|
||||
}
|
||||
|
||||
candidateUI?.candidateFont = Self.candidateFont(
|
||||
name: PrefMgr.shared.candidateTextFontName, size: PrefMgr.shared.candidateListTextSize
|
||||
|
|
|
@ -54,7 +54,7 @@ public extension SessionCtl {
|
|||
case .ofAssociates:
|
||||
handleIMKCandidatesPrepared(state.candidates, prefix: "⇧")
|
||||
case .ofInputting where state.isCandidateContainer:
|
||||
handleIMKCandidatesPrepared(state.candidates, prefix: "🗲")
|
||||
handleIMKCandidatesPrepared(state.candidates)
|
||||
case .ofCandidates:
|
||||
guard !state.candidates.isEmpty else { return .init() }
|
||||
if state.candidates[0].keyArray.joined(separator: "-").contains("_punctuation") {
|
||||
|
@ -126,7 +126,7 @@ public extension SessionCtl {
|
|||
case .ofAssociates:
|
||||
fixIndexForIMKCandidates(&indexDeducted, prefix: "⇧", source: candidateString)
|
||||
case .ofInputting where state.isCandidateContainer:
|
||||
fixIndexForIMKCandidates(&indexDeducted, prefix: "🗲", source: candidateString)
|
||||
fixIndexForIMKCandidates(&indexDeducted, source: candidateString)
|
||||
case .ofSymbolTable:
|
||||
fixSymbolIndexForIMKCandidates()
|
||||
case .ofCandidates:
|
||||
|
|
Loading…
Reference in New Issue