diff --git a/Packages/vChewing_PhraseEditorUI/Sources/PhraseEditorUI/PhraseEditorUI.swift b/Packages/vChewing_PhraseEditorUI/Sources/PhraseEditorUI/PhraseEditorUI.swift index c4fb44eb..bf0c26ee 100644 --- a/Packages/vChewing_PhraseEditorUI/Sources/PhraseEditorUI/PhraseEditorUI.swift +++ b/Packages/vChewing_PhraseEditorUI/Sources/PhraseEditorUI/PhraseEditorUI.swift @@ -176,6 +176,9 @@ public struct VwrPhraseEditorUI: View { DispatchQueue.main.async { isLoading = true delegate.consolidate(text: &txtContent, pragma: false) // 強制整理 + if selUserDataType == .thePhrases { + delegate.tagOverrides(in: &txtContent, mode: selInputMode) + } isLoading = false isSaved = false } diff --git a/Source/Modules/WindowControllers/CtlPrefWindow_PhraseEditor.swift b/Source/Modules/WindowControllers/CtlPrefWindow_PhraseEditor.swift index e0f47e6f..a6141800 100644 --- a/Source/Modules/WindowControllers/CtlPrefWindow_PhraseEditor.swift +++ b/Source/Modules/WindowControllers/CtlPrefWindow_PhraseEditor.swift @@ -172,6 +172,9 @@ extension CtlPrefWindow: NSTextViewDelegate, NSTextFieldDelegate { DispatchQueue.main.async { [self] in isLoading = true vChewingLM.LMConsolidator.consolidate(text: &tfdPETextEditor.string, pragma: false) + if selUserDataType == .thePhrases { + LMMgr.shared.tagOverrides(in: &tfdPETextEditor.string, mode: selInputMode) + } isLoading = false isSaved = false }