From d3fc0574092d605807be0243a3da4603d3e5cb98 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 13 Nov 2022 18:34:08 +0800 Subject: [PATCH] SessionCtl // Use newer resetInputHandler() in setValue(). --- Source/Modules/SessionCtl_Core.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Modules/SessionCtl_Core.swift b/Source/Modules/SessionCtl_Core.swift index 966aab9e..794c4c6f 100644 --- a/Source/Modules/SessionCtl_Core.swift +++ b/Source/Modules/SessionCtl_Core.swift @@ -110,7 +110,6 @@ public class SessionCtl: IMKInputController { didSet { if PrefMgr.shared.onlyLoadFactoryLangModelsIfNeeded { LMMgr.loadDataModel(inputMode) } if oldValue != inputMode, inputMode != .imeModeNULL { - inputHandler.clear() // 這句不要砍,因為後面 handle State.Empty() 不一定執行。 // ---------------------------- /// 重設所有語言模組。這裡不需要做按需重設,因為對運算量沒有影響。 inputHandler.currentLM = LMMgr.currentLM // 會自動更新組字引擎內的模組。 @@ -120,7 +119,7 @@ public class SessionCtl: IMKInputController { /// 將輸入法偏好設定同步至語言模組內。 syncBaseLMPrefs() /// 重置輸入調度模組。 - resetInputHandler() + resetInputHandler(forceComposerCleanup: true) } } }