Chromium Code Reviews| Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| index 8232aae8b8de4a26080de0f111343c22d7212a14..19f59cf82bc907b98757584a38a1276ae96727b5 100644 |
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| @@ -883,10 +883,16 @@ void OmniboxEditModel::OnPopupDataChanged( |
| bool call_controller_onchanged = true; |
| inline_autocomplete_text_ = text; |
| - if (view_->OnInlineAutocompleteTextMaybeChanged( |
| - DisplayTextFromUserText(user_text_ + inline_autocomplete_text_), |
| - DisplayTextFromUserText(user_text_).length())) |
| + if (KeywordIsSelected() && |
| + view_->GetText() != DisplayTextFromUserText(user_text_)) { |
|
Peter Kasting
2012/10/02 07:37:12
Does this do the right thing in cases where we hav
Joe Thomas
2012/10/02 18:39:23
When keyword search mode is activated, AFAIK there
Peter Kasting
2012/10/02 18:42:35
We can definitely inline autocomplete while in key
Joe Thomas
2012/10/02 18:57:24
Yes, you are right. The patch breaks that usecase.
|
| + view_->SetWindowTextAndCaretPos(DisplayTextFromUserText(user_text_), 0, |
| + false, true); |
| + call_controller_onchanged = false; |
| + } else if (view_->OnInlineAutocompleteTextMaybeChanged( |
| + DisplayTextFromUserText(user_text_ + inline_autocomplete_text_), |
| + DisplayTextFromUserText(user_text_).length())) { |
| call_controller_onchanged = false; |
| + } |
| // If |has_temporary_text_| is true, then we previously had a manual selection |
| // but now don't (or |destination_for_temporary_text_change| would have been |