Update composing buffer after candidate keys (#145)

Recent versions of Chrome started to rely on whether composing buffer
gets updated after an arrow key event to determine whether to dismiss
(force commit) the composing buffer and handle the arrow key event for
the omnibox URL suggestions.
This commit is contained in:
Lukhnos Liu 2019-06-18 22:06:28 -07:00
parent 7fbadff658
commit 7978a9efba
1 changed files with 13 additions and 0 deletions

View File

@ -1010,6 +1010,7 @@ public:
if (!updated) {
[self beep];
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
else if (keyCode == kPageUpKeyCode) {
@ -1017,6 +1018,7 @@ public:
if (!updated) {
[self beep];
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
else if (keyCode == kLeftKeyCode) {
@ -1025,10 +1027,12 @@ public:
if (!updated) {
[self beep];
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
else {
[self beep];
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
}
@ -1038,10 +1042,12 @@ public:
if (!updated) {
[self beep];
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
else {
[self beep];
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
}
@ -1051,6 +1057,7 @@ public:
if (!updated) {
[self beep];
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
else {
@ -1058,6 +1065,7 @@ public:
if (!updated) {
[self beep];
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
}
@ -1067,6 +1075,7 @@ public:
if (!updated) {
[self beep];
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
else {
@ -1074,6 +1083,7 @@ public:
if (!updated) {
[self beep];
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
}
@ -1086,6 +1096,7 @@ public:
gCurrentCandidateController.selectedCandidateIndex = 0;
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
else if (keyCode == kEndKeyCode && [_candidates count] > 0) {
@ -1096,6 +1107,7 @@ public:
gCurrentCandidateController.selectedCandidateIndex = [_candidates count] - 1;
}
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
else {
@ -1127,6 +1139,7 @@ public:
}
[self beep];
[self updateClientComposingBuffer:_currentCandidateClient];
return YES;
}
}