SessionCtl // Stop committing unwanted newlines.

This commit is contained in:
ShikiSuen 2022-10-26 11:14:54 +08:00
parent 7cbaad774d
commit 6fce25ed2c
1 changed files with 1 additions and 0 deletions

View File

@ -145,6 +145,7 @@ extension SessionCtl {
///
/// IMK commitComposition
private func commit(text: String) {
let text = text.trimmingCharacters(in: .newlines)
guard let client = client(), !text.isEmpty else { return }
let buffer = ChineseConverter.kanjiConversionIfRequired(text)
if buffer.isEmpty {