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 3b1cd78c544051287ce9a022468e35901a3abe5e..bf1d0865262505ab03cd9745b5f77c822d5b590d 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
@@ -1126,23 +1126,27 @@ bool OmniboxEditModel::DoInstant( |
if (user_input_in_progress_ && popup_->IsOpen()) { |
// The two pieces of text we want to send Instant, viz., what the user has |
- // typed, and any inline autocomplete suggestion. |
+ // typed, and the full omnibox text including any inline autocompletion. |
string16 user_text = user_text_; |
- *suggested_text = inline_autocomplete_text_; |
+ string16 full_text = user_text_ + inline_autocomplete_text_; |
// If there's temporary text, that overrides the user_text. In this case, we |
// should ignore any inline_autocomplete_text_, because it won't be visible. |
if (has_temporary_text_) { |
Peter Kasting
2012/08/24 22:27:19
Nit: Remove {}
sreeram
2012/08/24 23:09:55
Done.
|
- user_text = CurrentMatch().fill_into_edit; |
- suggested_text->clear(); |
+ user_text = full_text = CurrentMatch().fill_into_edit; |
} |
- // Remove any keywords and "?" prefix. |
+ // Remove keyword if we're in keyword mode. |
user_text = DisplayTextFromUserText(user_text); |
+ full_text = DisplayTextFromUserText(full_text); |
+ |
+ // Remove "?" if we're in forced query mode. |
AutocompleteInput::RemoveForcedQueryStringIfNecessary( |
autocomplete_controller_->input().type(), &user_text); |
+ AutocompleteInput::RemoveForcedQueryStringIfNecessary( |
+ autocomplete_controller_->input().type(), &full_text); |
- return instant->Update(match, user_text, UseVerbatimInstant(), |
+ return instant->Update(match, user_text, full_text, UseVerbatimInstant(), |
suggested_text, complete_behavior); |
} |
@@ -1152,6 +1156,7 @@ bool OmniboxEditModel::DoInstant( |
// Hide(). |
if (!instant->commit_on_pointer_release()) |
instant->Hide(); |
+ |
Peter Kasting
2012/08/24 22:27:19
NIt: Don't really need this new line
sreeram
2012/08/24 23:09:55
Done.
|
return false; |
} |