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 7229b5872b8edab1725d8e7ffc6eeefa7fedeb0d..99120b647773f58688eaee3873548a6f8150586c 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
@@ -212,11 +212,15 @@ void OmniboxEditModel::SetInstantSuggestion( |
break; |
case INSTANT_COMPLETE_REPLACE: |
+ const bool save_original_selection = !has_temporary_text_; |
sky
2013/01/11 00:15:57
nit: use {} since you're adding a variable only fo
beaudoin
2013/01/13 20:02:39
Done.
|
view_->SetInstantSuggestion(string16()); |
has_temporary_text_ = true; |
is_temporary_text_set_by_instant_ = true; |
- view_->SetWindowTextAndCaretPos(suggestion.text, suggestion.text.size(), |
- false, false); |
+ // Instant suggestions are never a keyword. |
+ keyword_ = string16(); |
+ is_keyword_hint_ = false; |
+ view_->OnTemporaryTextMaybeChanged(suggestion.text, |
+ save_original_selection); |
break; |
} |
} |