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 324f7086edc6181fadf1242a5021e3b5e3b7be4b..040695319971926207cf80d1f74418154abc541b 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
@@ -655,6 +655,15 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match, |
if (disposition != NEW_BACKGROUND_TAB) { |
base::AutoReset<bool> tmp(&in_revert_, true); |
view_->RevertAll(); // Revert the box to its unedited state |
+ if (controller()->GetInstant() && |
+ controller()->GetInstant()->IsInstantExtendedSearch()) { |
+ // In the case of an instant-extended search, actually revert to |
+ // |last_omnibox_text|, which is what the user is searching for. This |
+ // avoids a flash of the previous query. |
+ view_->OnTemporaryTextMaybeChanged( |
+ controller()->GetInstant()->last_omnibox_text(), |
+ true); |
+ } |
} |
if (match.type == AutocompleteMatch::EXTENSION_APP) { |