| Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc | 
| diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc | 
| index 8e16c6e8012ed518b3c2330e3acb1ea3702bfcce..3b258dc1b88c0f23fc020a2d16b6c256b2bb6474 100644 | 
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc | 
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc | 
| @@ -465,6 +465,12 @@ void OmniboxEditModel::StartAutocomplete( | 
| // Cursor position is equivalent to the current selection's end. | 
| size_t start; | 
| view_->GetSelectionBounds(&start, &cursor_position); | 
| +    // Adjust cursor position taking into account possible keyword in the user | 
| +    // text.  We rely on DisplayTextFromUserText() method which is consistent | 
| +    // with keyword extraction done in KeywordProvider/SearchProvider. | 
| +    const size_t cursor_offset = | 
| +        user_text_.length() - DisplayTextFromUserText(user_text_).length(); | 
| +    cursor_position += cursor_offset; | 
| } else { | 
| // There are some cases where StartAutocomplete() may be called | 
| // with non-empty |inline_autocomplete_text_|.  In such cases, we cannot | 
|  |