SessionCtl // Don't commit() if .ofInputting() has nothing to commit.

This commit is contained in:
ShikiSuen 2023-02-13 12:36:53 +08:00
parent 9256866f2c
commit dc75148c8c
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ public extension SessionCtl {
inputHandler?.clear() inputHandler?.clear()
case .ofInputting: case .ofInputting:
candidateUI?.visible = false candidateUI?.visible = false
commit(text: newState.textToCommit) if !newState.textToCommit.isEmpty { commit(text: newState.textToCommit) }
setInlineDisplayWithCursor() setInlineDisplayWithCursor()
// //
showTooltip(newState.tooltip, duration: newState.tooltipDuration) showTooltip(newState.tooltip, duration: newState.tooltipDuration)