diff --git a/Source/Modules/InputHandler_HandleComposition.swift b/Source/Modules/InputHandler_HandleComposition.swift index 5c150541..4ec8deab 100644 --- a/Source/Modules/InputHandler_HandleComposition.swift +++ b/Source/Modules/InputHandler_HandleComposition.swift @@ -86,7 +86,11 @@ extension InputHandler { // 這裡必須使用 composer.value.isEmpty,因為只有這樣才能真正檢測 composer 是否已經有陰平聲調了。 composeReading = composeReading || (!composer.isEmpty && confirmCombination) // readingKey 不能為空。 - composeReading = composeReading && !readingKey.isEmpty + var isReadingKeyNotEmpty = !readingKey.isEmpty + if isComposerUsingPinyin { + isReadingKeyNotEmpty = isReadingKeyNotEmpty || !composer.romajiBuffer.isEmpty + } + composeReading = composeReading && isReadingKeyNotEmpty if composeReading { if input.isControlHold, input.isCommandHold, input.isEnter, !input.isOptionHold, !input.isShiftHold, compositor.isEmpty diff --git a/Source/Modules/InputHandler_HandleInput.swift b/Source/Modules/InputHandler_HandleInput.swift index 4d3b87d9..860e13fd 100644 --- a/Source/Modules/InputHandler_HandleInput.swift +++ b/Source/Modules/InputHandler_HandleInput.swift @@ -207,7 +207,7 @@ extension InputHandler { delegate.switchState(inputting) } else { let displayedText = state.displayedText - if !displayedText.isEmpty { + if !displayedText.isEmpty, !isConsideredEmptyForNow { delegate.switchState(IMEState.ofCommitting(textToCommit: displayedText)) } delegate.switchState(IMEState.ofCommitting(textToCommit: " "))