| Index: chrome/browser/autocomplete/autocomplete_edit.cc
|
| diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
|
| index f63c2b80f0159e11ad8495f279c1166a61e32827..10ed251852ff399aeb2fdca06efca2cad23781e5 100644
|
| --- a/chrome/browser/autocomplete/autocomplete_edit.cc
|
| +++ b/chrome/browser/autocomplete/autocomplete_edit.cc
|
| @@ -499,6 +499,8 @@ void AutocompleteEditModel::OnControlKeyChanged(bool pressed) {
|
| // the input text.
|
| InternalSetUserText(UserTextFromDisplayText(view_->GetText()));
|
| has_temporary_text_ = false;
|
| + if (KeywordIsSelected())
|
| + AcceptKeyword();
|
| }
|
| if ((old_state != DOWN_WITH_CHANGE) && popup_->IsOpen()) {
|
| // Autocomplete history provider results may change, so refresh the
|
| @@ -628,8 +630,7 @@ bool AutocompleteEditModel::OnAfterPossibleChange(const std::wstring& new_text,
|
| return false;
|
| }
|
|
|
| - const bool had_keyword = (keyword_ui_state_ != NO_KEYWORD) &&
|
| - !is_keyword_hint_ && !keyword_.empty();
|
| + const bool had_keyword = KeywordIsSelected();
|
|
|
| // Modifying the selection counts as accepting the autocompleted text.
|
| InternalSetUserText(UserTextFromDisplayText(new_text));
|
|
|