Index: chrome/browser/autocomplete/autocomplete_edit_view_win.cc |
=================================================================== |
--- chrome/browser/autocomplete/autocomplete_edit_view_win.cc (revision 80563) |
+++ chrome/browser/autocomplete/autocomplete_edit_view_win.cc (working copy) |
@@ -2019,17 +2019,13 @@ |
} |
case VK_TAB: { |
- if (model_->is_keyword_hint()) { |
+ const bool shift_pressed = GetKeyState(VK_SHIFT) < 0; |
+ if (model_->is_keyword_hint() && !shift_pressed) { |
// Accept the keyword. |
ScopedFreeze freeze(this, GetTextObjectModel()); |
model_->AcceptKeyword(); |
- } else if (!IsCaretAtEnd()) { |
- ScopedFreeze freeze(this, GetTextObjectModel()); |
- OnBeforePossibleChange(); |
- PlaceCaretAt(GetTextLength()); |
- OnAfterPossibleChange(); |
} else { |
- model_->CommitSuggestedText(true); |
+ model_->OnUpOrDownKeyPressed(shift_pressed ? -count : count); |
} |
return true; |
} |