傳統注音不要記住用戶選字

This commit is contained in:
ovadmin 2017-10-02 00:40:28 +08:00 committed by Lukhnos Liu
parent eef6f8c0ce
commit 2e8e78971c
1 changed files with 6 additions and 2 deletions

View File

@ -665,7 +665,9 @@ public:
[self popOverflowComposingTextAndWalk:client];
// get user override model suggestion
string overrideCandidate = _uom->suggest(_walkedNodes, _builder->cursorIndex(), [[NSDate date] timeIntervalSince1970]);
string overrideCandidate =
(_inputMode == kPlainBopomofoModeIdentifier) ? "" :
_uom->suggest(_walkedNodes, _builder->cursorIndex(), [[NSDate date] timeIntervalSince1970]);
if (!overrideCandidate.empty()) {
size_t cursorIndex = [self actualCandidateCursorIndex];
vector<NodeAnchor> nodes = _builder->grid().nodesCrossingOrEndingAt(cursorIndex);
@ -1405,7 +1407,9 @@ public:
size_t cursorIndex = [self actualCandidateCursorIndex];
_builder->grid().fixNodeSelectedCandidate(cursorIndex, selectedValue);
if (_inputMode != kPlainBopomofoModeIdentifier) {
_uom->observe(_walkedNodes, cursorIndex, selectedValue, [[NSDate date] timeIntervalSince1970]);
}
[_candidates removeAllObjects];