From 77a4b47ba3b7b632020288072c7f18a86033d23f Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 14 Apr 2022 18:39:34 +0800 Subject: [PATCH] KeyHandler // Always set _inputMode when init(). --- Source/Modules/ControllerModules/KeyHandler.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/ControllerModules/KeyHandler.mm b/Source/Modules/ControllerModules/KeyHandler.mm index b515ded4..46d5458b 100644 --- a/Source/Modules/ControllerModules/KeyHandler.mm +++ b/Source/Modules/ControllerModules/KeyHandler.mm @@ -116,7 +116,6 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; // 拿當前的 _inputMode 與 ctlInputMethod 的提報結果對比,不同的話則套用新設定: if (![_inputMode isEqualToString:ctlInputMethod.currentInputMode]) { - _inputMode = ctlInputMethod.currentInputMode; // Reinitiate language models if necessary [self setInputModesToLM:isCHS]; @@ -129,6 +128,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if (![self isPhoneticReadingBufferEmpty]) [self clearPhoneticReadingBuffer]; } + _inputMode = ctlInputMethod.currentInputMode; } - (void)dealloc