Index: chrome/browser/autocomplete/history_url_provider.cc |
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc |
index e831193fd3c86d59f6fa9bdc39aec0ba193f6e0d..535fd5fb4d1f45db0e6b841ab5e8f1fe7c4ce00e 100644 |
--- a/chrome/browser/autocomplete/history_url_provider.cc |
+++ b/chrome/browser/autocomplete/history_url_provider.cc |
@@ -349,7 +349,7 @@ AutocompleteMatch HistoryURLProvider::SuggestExactInput( |
match.fill_into_edit = |
AutocompleteInput::FormattedStringWithEquivalentMeaning(url, |
display_string); |
- // NOTE: Don't set match.inline_autocomplete_offset (to allow inline |
+ // NOTE: Don't set match.inline_autocompletion (to allow inline |
// autocompletion) here, it's surprising and annoying. |
Peter Kasting
2013/07/16 18:09:05
Nit: How about:
NOTE: Don't set match.inline_auto
Mark P
2013/07/16 18:53:23
Done.
|
// Try to highlight "innermost" match location. If we fix up "w" into |
@@ -1059,10 +1059,12 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch( |
net::FormatUrl(info.url(), languages, format_types, |
net::UnescapeRule::SPACES, NULL, NULL, |
&inline_autocomplete_offset)); |
- if (!params->prevent_inline_autocomplete) |
- match.inline_autocomplete_offset = inline_autocomplete_offset; |
- DCHECK((match.inline_autocomplete_offset == string16::npos) || |
- (match.inline_autocomplete_offset <= match.fill_into_edit.length())); |
+ if (!params->prevent_inline_autocomplete && |
+ (inline_autocomplete_offset != string16::npos)) { |
+ DCHECK(inline_autocomplete_offset <= match.fill_into_edit.length()); |
+ match.inline_autocompletion = |
+ match.fill_into_edit.substr(inline_autocomplete_offset); |
+ } |
size_t match_start = history_match.input_location; |
match.contents = net::FormatUrl(info.url(), languages, |