From f69455892ba050944282ac6f1ffdc7bb532bf35b Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 2 Aug 2022 12:03:10 +0800 Subject: [PATCH] ctlIME // Another attempt to make IME work aftermath. --- Source/Modules/ControllerModules/ctlInputMethod_Core.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Modules/ControllerModules/ctlInputMethod_Core.swift b/Source/Modules/ControllerModules/ctlInputMethod_Core.swift index 0e71c4a8..f188bbb6 100644 --- a/Source/Modules/ControllerModules/ctlInputMethod_Core.swift +++ b/Source/Modules/ControllerModules/ctlInputMethod_Core.swift @@ -85,6 +85,7 @@ class ctlInputMethod: IMKInputController { keyHandler.delegate = self // 下述兩行很有必要,否則輸入法會在手動重啟之後無法立刻生效。 activateServer(inputClient) + keyHandler.ensureParser() resetKeyHandler() } @@ -99,7 +100,7 @@ class ctlInputMethod: IMKInputController { // 因為偶爾會收到與 activateServer 有關的以「強制拆 nil」為理由的報錯, // 所以這裡添加這句、來試圖應對這種情況。 if keyHandler.delegate == nil { keyHandler.delegate = self } - + setValue(IME.currentInputMode.rawValue, forTag: 114514, client: client()) keyHandler.clear() keyHandler.ensureParser()