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

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

Issue 10791: Added select all text functionality after pressing ESC ... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 1 month 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
===================================================================
--- chrome/browser/autocomplete/autocomplete_edit.cc (revision 6098)
+++ chrome/browser/autocomplete/autocomplete_edit.cc (working copy)
@@ -361,9 +361,11 @@
bool AutocompleteEditModel::OnEscapeKeyPressed() {
// Only do something when there is input in progress -- otherwise, if focus
// happens to be in the location bar, users can't still hit <esc> to stop a
- // load.
- if (!user_input_in_progress_)
+ // load. Then select the whole line.
Peter Kasting 2008/11/27 23:36:20 Nit: Don't put this comment here. Instead put an
+ if (!user_input_in_progress_) {
+ view_->SelectAll(true);
return false;
+ }
if (!has_temporary_text_ ||
(popup_->URLsForCurrentSelection(NULL, NULL, NULL) == original_url_)) {
« 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