Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(831)

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 1030413002: Revert of Allow users to perform queries in the omnibox which begin with a search shortcut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ea82b4c33c5e133333b047de6f5405e6b668b8d1..12f9848cd42ab4f96f90801751bda7a485bd332f 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -880,17 +880,14 @@
autocomplete_controller()->Stop(false);
omnibox_controller_->ClearPopupKeywordMode();
- // Add a space after the keyword to allow the user to continue typing without
- // re-enabling keyword mode.
- const base::string16 window_text =
- keyword_ + base::ASCIIToUTF16(" ") + visible_text;
+ const base::string16 window_text(keyword_ + visible_text);
// 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() + 1,
+ view_->SetWindowTextAndCaretPos(window_text.c_str(), keyword_.length(),
false, false);
keyword_.clear();
is_keyword_hint_ = false;
@@ -900,7 +897,7 @@
// longer.
} else {
is_keyword_hint_ = true;
- view_->SetWindowTextAndCaretPos(window_text.c_str(), keyword_.length() + 1,
+ view_->SetWindowTextAndCaretPos(window_text.c_str(), keyword_.length(),
false, true);
}
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698