 Chromium Code Reviews
 Chromium Code Reviews Issue 12039053:
  Fix cursor position for default provider searches in keyword mode.  (Closed) 
  Base URL: http://git.chromium.org/git/chromium.git@trunk
    
  
    Issue 12039053:
  Fix cursor position for default provider searches in keyword mode.  (Closed) 
  Base URL: http://git.chromium.org/git/chromium.git@trunk| 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..3df7fc44f8dab2de0933f9a9f949815be1d91cc4 100644 | 
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc | 
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc | 
| @@ -465,6 +465,8 @@ void OmniboxEditModel::StartAutocomplete( | 
| // Cursor position is equivalent to the current selection's end. | 
| size_t start; | 
| view_->GetSelectionBounds(&start, &cursor_position); | 
| + if (keyword_is_selected) | 
| + cursor_position += keyword_.length() + 1; | 
| 
Peter Kasting
2013/01/28 00:04:22
Describe what this +1 comes from.
 
Bart N.
2013/01/29 21:28:17
Done.
 | 
| } else { | 
| // There are some cases where StartAutocomplete() may be called | 
| // with non-empty |inline_autocomplete_text_|. In such cases, we cannot |