From c943f4ec5250f82a05d79a786c479ab4d04334a2 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 30 Oct 2023 10:46:21 +0800 Subject: [PATCH] SessionCtl // Remove PreCommit Handling. --- .../MainAssembly/SessionCtl_HandleStates.swift | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Packages/vChewing_MainAssembly/Sources/MainAssembly/SessionCtl_HandleStates.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SessionCtl_HandleStates.swift index 2b6a9b4b..0e7b847c 100644 --- a/Packages/vChewing_MainAssembly/Sources/MainAssembly/SessionCtl_HandleStates.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SessionCtl_HandleStates.swift @@ -144,7 +144,6 @@ public extension SessionCtl { func doCommit() { guard let client = client() else { return } - handlePreCommit() client.insertText( buffer, replacementRange: replacementRange() ) @@ -185,16 +184,4 @@ public extension SessionCtl { ) } } - - func handlePreCommit() { - let whoShouldBypassHandling: [String] = ["com.barebones.bbedit", "com.barebones.textwrangler"] - if !whoShouldBypassHandling.contains(clientBundleIdentifier) { - let blankStr = NSMutableAttributedString(string: "") - blankStr.setAttributes( - mark(forStyle: kTSMHiliteConvertedText, at: .zero) as? [NSAttributedString.Key: Any] ?? [:], - range: .zero - ) - doSetMarkedText(blankStr, allowAsync: false) - } - } }