From 3b734c2cda071e5e6c4e3ed21aa3accb27cf302d Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 29 Jun 2022 12:51:55 +0800 Subject: [PATCH] KeyHandler // popOverflowComposingText -> commitOverflownComposition. --- Source/Modules/ControllerModules/KeyHandler_Core.swift | 2 +- .../Modules/ControllerModules/KeyHandler_HandleInput.swift | 6 +++--- Source/Modules/ControllerModules/KeyHandler_States.swift | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_Core.swift b/Source/Modules/ControllerModules/KeyHandler_Core.swift index bc86981a..79bbe252 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Core.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Core.swift @@ -135,7 +135,7 @@ class KeyHandler { /// 會使得運算壓力隨著節錨數量的增加而增大。於是,有必要限定組字區的長度。 /// 超過該長度的內容會在爬軌之前先遞交出去,使其不再記入最大相似度估算的 /// 估算對象範圍。用比較形象且生動卻有點噁心的解釋的話,蒼蠅一邊吃一邊屙。 - var popOverflowComposingTextAndWalk: String { + var commitOverflownCompositionAndWalk: String { var textToCommit = "" if compositor.grid.width > mgrPrefs.composingBufferSize, !walkedAnchors.isEmpty { let anchor: Megrez.NodeAnchor = walkedAnchors[0] diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift index 4b885cf7..3523d1b4 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift @@ -205,7 +205,7 @@ extension KeyHandler { insertToCompositorAtCursor(reading: reading) // 讓組字器反爬軌格。 - let textToCommit = popOverflowComposingTextAndWalk + let textToCommit = commitOverflownCompositionAndWalk // 看看半衰記憶模組是否會對目前的狀態給出自動選字建議。 fetchAndApplySuggestionsFromUserOverrideModel() @@ -283,7 +283,7 @@ extension KeyHandler { stateCallback(InputState.Empty()) } else if ifLangModelHasUnigrams(forKey: " ") { insertToCompositorAtCursor(reading: " ") - let textToCommit = popOverflowComposingTextAndWalk + let textToCommit = commitOverflownCompositionAndWalk let inputting = buildInputtingState inputting.textToCommit = textToCommit stateCallback(inputting) @@ -394,7 +394,7 @@ extension KeyHandler { if ifLangModelHasUnigrams(forKey: "_punctuation_list") { if composer.isEmpty { insertToCompositorAtCursor(reading: "_punctuation_list") - let textToCommit: String! = popOverflowComposingTextAndWalk + let textToCommit: String! = commitOverflownCompositionAndWalk let inputting = buildInputtingState inputting.textToCommit = textToCommit stateCallback(inputting) diff --git a/Source/Modules/ControllerModules/KeyHandler_States.swift b/Source/Modules/ControllerModules/KeyHandler_States.swift index 7dc5919d..dba1af25 100644 --- a/Source/Modules/ControllerModules/KeyHandler_States.swift +++ b/Source/Modules/ControllerModules/KeyHandler_States.swift @@ -298,7 +298,7 @@ extension KeyHandler { if composer.isEmpty { insertToCompositorAtCursor(reading: customPunctuation) - let textToCommit = popOverflowComposingTextAndWalk + let textToCommit = commitOverflownCompositionAndWalk let inputting = buildInputtingState inputting.textToCommit = textToCommit stateCallback(inputting)