InputState // Recognize EmptyIgnoringPreviousState as Empty.
- The only difference is that EmptyIgnoringPreviousState doesn't commit the contents of the previous state.
This commit is contained in:
parent
910a047a5b
commit
13d2569919
|
@ -83,12 +83,8 @@ class InputState {
|
|||
// MARK: -
|
||||
|
||||
/// Represents that the composing buffer is empty.
|
||||
class EmptyIgnoringPreviousState: InputState {
|
||||
var composingBuffer: String {
|
||||
""
|
||||
}
|
||||
|
||||
var description: String {
|
||||
class EmptyIgnoringPreviousState: Empty {
|
||||
override var description: String {
|
||||
"<InputState.EmptyIgnoringPreviousState>"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -308,7 +308,9 @@ extension ctlInputMethod {
|
|||
return
|
||||
}
|
||||
|
||||
if let previous = previous as? InputState.NotEmpty {
|
||||
if let previous = previous as? InputState.NotEmpty,
|
||||
!(state is InputState.EmptyIgnoringPreviousState)
|
||||
{
|
||||
commit(text: previous.composingBuffer, client: client)
|
||||
}
|
||||
client.setMarkedText(
|
||||
|
|
Loading…
Reference in New Issue