SessionCtl // Show non-empty tooltip on .ofEmpty() state.
This commit is contained in:
parent
27061754d6
commit
d1bd34ee43
|
@ -72,22 +72,19 @@ extension SessionCtl {
|
||||||
default: break innerCircle
|
default: break innerCircle
|
||||||
}
|
}
|
||||||
ctlCandidateCurrent.visible = false
|
ctlCandidateCurrent.visible = false
|
||||||
tooltipInstance.hide()
|
|
||||||
// 全專案用以判斷「.Abortion」的地方僅此一處。
|
// 全專案用以判斷「.Abortion」的地方僅此一處。
|
||||||
if previous.hasComposition, ![.ofAbortion, .ofCommitting].contains(newState.type) {
|
if previous.hasComposition, ![.ofAbortion, .ofCommitting].contains(newState.type) {
|
||||||
commit(text: previous.displayedText)
|
commit(text: previous.displayedText)
|
||||||
}
|
}
|
||||||
// 在這裡手動再取消一次選字窗與工具提示的顯示,可謂雙重保險。
|
showTooltip(newState.tooltip) // 會在工具提示為空的時候自動消除顯示。
|
||||||
tooltipInstance.hide()
|
|
||||||
clearInlineDisplay()
|
clearInlineDisplay()
|
||||||
// 最後一道保險
|
// 最後一道保險
|
||||||
inputHandler.clear()
|
inputHandler.clear()
|
||||||
case .ofInputting:
|
case .ofInputting:
|
||||||
ctlCandidateCurrent.visible = false
|
ctlCandidateCurrent.visible = false
|
||||||
tooltipInstance.hide()
|
|
||||||
commit(text: newState.textToCommit)
|
commit(text: newState.textToCommit)
|
||||||
setInlineDisplayWithCursor()
|
setInlineDisplayWithCursor()
|
||||||
showTooltip(newState.tooltip)
|
showTooltip(newState.tooltip) // 會在工具提示為空的時候自動消除顯示。
|
||||||
case .ofMarking:
|
case .ofMarking:
|
||||||
ctlCandidateCurrent.visible = false
|
ctlCandidateCurrent.visible = false
|
||||||
setInlineDisplayWithCursor()
|
setInlineDisplayWithCursor()
|
||||||
|
|
Loading…
Reference in New Issue