From 759ebe7f7d20ceeca7fd4e86bc45dc2568bfd045 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 26 Jul 2022 16:35:23 +0800 Subject: [PATCH] KeyHandler // Typo fix. --- Source/Modules/ControllerModules/InputState.swift | 8 ++++---- .../ControllerModules/KeyHandler_HandleInput.swift | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Modules/ControllerModules/InputState.swift b/Source/Modules/ControllerModules/InputState.swift index 07915b45..b7a64d69 100644 --- a/Source/Modules/ControllerModules/InputState.swift +++ b/Source/Modules/ControllerModules/InputState.swift @@ -33,7 +33,7 @@ enum StateType { case ofDeactivated case ofAssociatedPhrases case ofEmpty - case ofEmptyIgnorePreviousState + case ofEmptyIgnoringPreviousState case ofCommitting case ofNotEmpty case ofInputting @@ -70,7 +70,7 @@ protocol InputStateProtocol { /// 組字區內存入任何東西,所以該狀態不受 .NotEmpty 的管轄。 /// - .Empty: 使用者剛剛切換至該輸入法、卻還沒有任何輸入行為。抑或是剛剛敲字遞交給 /// 客體應用、準備新的輸入行為。 -/// - .EmptyIgnorePreviousState: 與 Empty 類似,但會扔掉上一個狀態的內容、不將這些 +/// - .EmptyIgnoringPreviousState: 與 Empty 類似,但會扔掉上一個狀態的內容、不將這些 /// 內容遞交給客體應用。該狀態在處理完畢之後會被立刻切換至 .Empty()。 /// - .Committing: 該狀態會承載要遞交出去的內容,讓輸入法控制器處理時代為遞交。 /// - .NotEmpty: 非空狀態,是一種狀態大類、用以派生且代表下述諸狀態。 @@ -106,11 +106,11 @@ enum InputState { // MARK: - - /// .EmptyIgnorePreviousState: 與 Empty 類似, + /// .EmptyIgnoringPreviousState: 與 Empty 類似, /// 但會扔掉上一個狀態的內容、不將這些內容遞交給客體應用。 /// 該狀態在處理完畢之後會被立刻切換至 .Empty()。 class EmptyIgnoringPreviousState: Empty { - override public var type: StateType { .ofEmptyIgnorePreviousState } + override public var type: StateType { .ofEmptyIgnoringPreviousState } override var description: String { "" } diff --git a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift index 0793cab1..18986586 100644 --- a/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift +++ b/Source/Modules/ControllerModules/KeyHandler_HandleInput.swift @@ -55,7 +55,7 @@ extension KeyHandler { // 提前過濾掉一些不合規的按鍵訊號輸入,免得相關按鍵訊號被送給 Megrez 引發輸入法崩潰。 if input.isInvalid { // 在「.Empty(IgnoringPreviousState) 與 .Deactivated」狀態下的首次不合規按鍵輸入可以直接放行。 - // 因為「.EmptyIgnorePreviousState」會在處理之後被自動轉為「.Empty」,所以不需要單獨判斷。 + // 因為「.EmptyIgnoringPreviousState」會在處理之後被自動轉為「.Empty」,所以不需要單獨判斷。 if state is InputState.Empty || state is InputState.Deactivated { return false }