SessionCtl // Do clearInlineDisplay() in commitComposition().
This commit is contained in:
parent
8216497382
commit
11edfbddfb
|
@ -277,6 +277,7 @@ extension SessionCtl {
|
||||||
public override func commitComposition(_ sender: Any!) {
|
public override func commitComposition(_ sender: Any!) {
|
||||||
_ = sender // 防止格式整理工具毀掉與此對應的參數。
|
_ = sender // 防止格式整理工具毀掉與此對應的參數。
|
||||||
resetInputHandler()
|
resetInputHandler()
|
||||||
|
clearInlineDisplay()
|
||||||
// super.commitComposition(sender) // 這句不要引入,否則每次切出輸入法時都會死當。
|
// super.commitComposition(sender) // 這句不要引入,否則每次切出輸入法時都會死當。
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ extension SessionCtl {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 在處理某些「沒有組字區內容顯示」且「不需要攔截某些按鍵處理」的狀態時使用的函式,會清空螢幕上顯示的組字區。
|
/// 在處理某些「沒有組字區內容顯示」且「不需要攔截某些按鍵處理」的狀態時使用的函式,會清空螢幕上顯示的組字區。
|
||||||
private func clearInlineDisplay() {
|
public func clearInlineDisplay() {
|
||||||
doSetMarkedText(
|
doSetMarkedText(
|
||||||
"", selectionRange: NSRange(location: 0, length: 0),
|
"", selectionRange: NSRange(location: 0, length: 0),
|
||||||
replacementRange: NSRange(location: NSNotFound, length: NSNotFound)
|
replacementRange: NSRange(location: NSNotFound, length: NSNotFound)
|
||||||
|
|
Loading…
Reference in New Issue