Chromium Code Reviews| Index: chrome/browser/autocomplete/autocomplete_edit_view_win.cc |
| =================================================================== |
| --- chrome/browser/autocomplete/autocomplete_edit_view_win.cc (revision 79782) |
| +++ chrome/browser/autocomplete/autocomplete_edit_view_win.cc (working copy) |
| @@ -2022,17 +2022,13 @@ |
| } |
| case VK_TAB: { |
| - if (model_->is_keyword_hint()) { |
| + const bool no_shift = GetKeyState(VK_SHIFT) >= 0; |
|
Peter Kasting
2011/04/01 00:09:09
Nit: Reverse this and call the variable |shift_pre
|
| + if (model_->is_keyword_hint() && no_shift) { |
| // Accept the keyword. |
| ScopedFreeze freeze(this, GetTextObjectModel()); |
| - model_->AcceptKeyword(); |
| - } else if (!IsCaretAtEnd()) { |
| - ScopedFreeze freeze(this, GetTextObjectModel()); |
| - OnBeforePossibleChange(); |
| - PlaceCaretAt(GetTextLength()); |
| - OnAfterPossibleChange(); |
| + model_->AcceptKeyword(false); |
| } else { |
| - model_->CommitSuggestedText(true); |
| + model_->OnUpOrDownKeyPressed(no_shift ? count : -count); |
| } |
| return true; |
| } |