KeyHandler // +keepReadingUponCompositionError.

This commit is contained in:
ShikiSuen 2022-08-01 11:51:58 +08:00
parent cc59bdd1ad
commit a57bf13f6a
1 changed files with 8 additions and 4 deletions

View File

@ -60,7 +60,7 @@ extension KeyHandler {
}
}
var composeReading = composer.hasToneMarker() //
var composeReading = composer.hasToneMarker() && composer.inputValidityCheck(key: input.charCode) //
// Enter Space _composer
// |=
@ -78,6 +78,12 @@ extension KeyHandler {
if !currentLM.hasUnigramsFor(key: readingKey) {
IME.prtDebugIntel("B49C0979語彙庫內無「\(readingKey)」的匹配記錄。")
errorCallback()
if mgrPrefs.keepReadingUponCompositionError {
stateCallback(buildInputtingState)
return true
}
composer.clear()
//
switch compositor.isEmpty {
@ -143,9 +149,7 @@ extension KeyHandler {
return true
}
/// true 調調
/// 6jˊˊ調
/// 調ˊˊˊˊˇˊ
/// 調
if keyConsumedByReading {
// updateClientComposingBuffer()
stateCallback(buildInputtingState)