diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift index 25fbf97f..8b25c4b5 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift @@ -184,12 +184,12 @@ extension KeyHandler { // 小麥注音因為使用 OVMandarin,所以不需要這樣補。但鐵恨引擎對所有聲調一視同仁。 composer.receiveKey(fromString: " ") } - let reading = composer.getComposition() // 拿取用來進行索引檢索用的注音。 + let readingKey = composer.getComposition() // 拿取用來進行索引檢索用的注音。 // 如果輸入法的辭典索引是漢語拼音的話,要注意上一行拿到的內容得是漢語拼音。 // 向語言模型詢問是否有對應的記錄。 - if !currentLM.hasUnigramsFor(key: reading) { - IME.prtDebugIntel("B49C0979:語彙庫內無「\(reading)」的匹配記錄。") + if !currentLM.hasUnigramsFor(key: readingKey) { + IME.prtDebugIntel("B49C0979:語彙庫內無「\(readingKey)」的匹配記錄。") errorCallback() composer.clear() // 根據「組字器是否為空」來判定回呼哪一種狀態。 @@ -198,7 +198,7 @@ extension KeyHandler { } // 將該讀音插入至組字器內的軌格當中。 - compositor.insertReading(reading) + compositor.insertReading(readingKey) // 讓組字器反爬軌格。 let textToCommit = commitOverflownCompositionAndWalk