SessionCtl // Stop committing unwanted newlines.
This commit is contained in:
parent
7cbaad774d
commit
6fce25ed2c
|
@ -145,6 +145,7 @@ extension SessionCtl {
|
||||||
/// 遞交組字區內容。
|
/// 遞交組字區內容。
|
||||||
/// 注意:必須在 IMK 的 commitComposition 函式當中也間接或者直接執行這個處理。
|
/// 注意:必須在 IMK 的 commitComposition 函式當中也間接或者直接執行這個處理。
|
||||||
private func commit(text: String) {
|
private func commit(text: String) {
|
||||||
|
let text = text.trimmingCharacters(in: .newlines)
|
||||||
guard let client = client(), !text.isEmpty else { return }
|
guard let client = client(), !text.isEmpty else { return }
|
||||||
let buffer = ChineseConverter.kanjiConversionIfRequired(text)
|
let buffer = ChineseConverter.kanjiConversionIfRequired(text)
|
||||||
if buffer.isEmpty {
|
if buffer.isEmpty {
|
||||||
|
|
Loading…
Reference in New Issue