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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit.cc

Issue 3322001: Handle ctrl press when arrowing to a search keyword (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit.cc
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index f63c2b80f0159e11ad8495f279c1166a61e32827..10ed251852ff399aeb2fdca06efca2cad23781e5 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -499,6 +499,8 @@ void AutocompleteEditModel::OnControlKeyChanged(bool pressed) {
// the input text.
InternalSetUserText(UserTextFromDisplayText(view_->GetText()));
has_temporary_text_ = false;
+ if (KeywordIsSelected())
+ AcceptKeyword();
}
if ((old_state != DOWN_WITH_CHANGE) && popup_->IsOpen()) {
// Autocomplete history provider results may change, so refresh the
@@ -628,8 +630,7 @@ bool AutocompleteEditModel::OnAfterPossibleChange(const std::wstring& new_text,
return false;
}
- const bool had_keyword = (keyword_ui_state_ != NO_KEYWORD) &&
- !is_keyword_hint_ && !keyword_.empty();
+ const bool had_keyword = KeywordIsSelected();
// Modifying the selection counts as accepting the autocompleted text.
InternalSetUserText(UserTextFromDisplayText(new_text));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698