SessionCtl // Remove PreCommit Handling.

This commit is contained in:
ShikiSuen 2023-10-30 10:46:21 +08:00
parent 378e32d7cd
commit c943f4ec52
1 changed files with 0 additions and 13 deletions

View File

@ -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)
}
}
}