Fixes the behavior of the delete and backspace key.
This commit is contained in:
parent
9612aa6ba0
commit
ee521b6ee2
|
@ -658,7 +658,12 @@ static NSString *const kGraphVizOutputfile = @"/tmp/McBopomofo-visualization.dot
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStateInputting *inputting = [self _buildInputtingState];
|
InputStateInputting *inputting = [self _buildInputtingState];
|
||||||
|
if (!inputting.composingBuffer.length) {
|
||||||
|
InputStateEmptyIgnoringPreviousState *empty = [[InputStateEmptyIgnoringPreviousState alloc] init];
|
||||||
|
stateCallback(empty);
|
||||||
|
} else {
|
||||||
stateCallback(inputting);
|
stateCallback(inputting);
|
||||||
|
}
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,7 +678,12 @@ static NSString *const kGraphVizOutputfile = @"/tmp/McBopomofo-visualization.dot
|
||||||
_builder->deleteReadingAfterCursor();
|
_builder->deleteReadingAfterCursor();
|
||||||
[self _walk];
|
[self _walk];
|
||||||
InputStateInputting *inputting = [self _buildInputtingState];
|
InputStateInputting *inputting = [self _buildInputtingState];
|
||||||
|
if (!inputting.composingBuffer.length) {
|
||||||
|
InputStateEmptyIgnoringPreviousState *empty = [[InputStateEmptyIgnoringPreviousState alloc] init];
|
||||||
|
stateCallback(empty);
|
||||||
|
} else {
|
||||||
stateCallback(inputting);
|
stateCallback(inputting);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
errorCallback();
|
errorCallback();
|
||||||
stateCallback(state);
|
stateCallback(state);
|
||||||
|
|
Loading…
Reference in New Issue