diff options
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm index e13f11c..e0362a9 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm @@ -471,7 +471,13 @@ void AutocompleteEditViewMac::EmphasizeURLComponents() { if (editor) { NSTextStorage* storage = [editor textStorage]; [storage beginEditing]; + + // Clear the existing attributes from the text storage, then + // overlay the appropriate Omnibox attributes. + [storage setAttributes:[NSDictionary dictionary] + range:NSMakeRange(0, [storage length])]; ApplyTextAttributes(GetText(), storage); + [storage endEditing]; } else { SetText(GetText()); |