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 8fa7680d7f94902a2ea0e8ac70a98e2d061bb512..b928f7ea18ea4b2f1d54ffd3085851fc1ff098cb 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
@@ -900,14 +900,15 @@ void OmniboxEditModel::ClearKeyword(const base::string16& visible_text) { |
autocomplete_controller()->Stop(false); |
omnibox_controller_->ClearPopupKeywordMode(); |
- const base::string16 window_text(keyword_ + visible_text); |
+ const base::string16 window_text(keyword_ + |
+ reinterpret_cast<base::char16 const*>(L" ") + visible_text); |
sky
2014/08/15 18:10:28
This isn't the right way to get a string16. You wa
|
// Only reset the result if the edit text has changed since the |
// keyword was accepted, or if the popup is closed. |
if (just_deleted_text_ || !visible_text.empty() || |
!(popup_model() && popup_model()->IsOpen())) { |
view_->OnBeforePossibleChange(); |
- view_->SetWindowTextAndCaretPos(window_text.c_str(), keyword_.length(), |
+ view_->SetWindowTextAndCaretPos(window_text.c_str(), keyword_.length() + 1, |
false, false); |
keyword_.clear(); |
is_keyword_hint_ = false; |
@@ -917,7 +918,7 @@ void OmniboxEditModel::ClearKeyword(const base::string16& visible_text) { |
// longer. |
} else { |
is_keyword_hint_ = true; |
- view_->SetWindowTextAndCaretPos(window_text.c_str(), keyword_.length(), |
+ view_->SetWindowTextAndCaretPos(window_text.c_str(), keyword_.length() + 1, |
false, true); |
} |