Chromium Code Reviews| 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_)) { |