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 b26a1d142389302493303aeffb306e383a67d1ec..739a495fa76638bd5c2c6be50e7b2e524cd24c0f 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
@@ -660,6 +660,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); |
+ } |
sreeram
2013/01/22 04:34:47
I see what you are trying to do here, but I'd like
|
} |
if (match.type == AutocompleteMatch::EXTENSION_APP) { |