@@ -9900,6 +9900,8 @@ private void updateSuggestions() {
99009900 suggestionInfo .suggestionIndex = ADD_TO_DICTIONARY ;
99019901 suggestionInfo .text .replace (0 , suggestionInfo .text .length (),
99029902 getContext ().getString (com .android .internal .R .string .addToDictionary ));
9903+ suggestionInfo .text .setSpan (suggestionInfo .highlightSpan , 0 , 0 ,
9904+ Spanned .SPAN_EXCLUSIVE_EXCLUSIVE );
99039905
99049906 mNumberOfSuggestions ++;
99059907 }
@@ -9911,6 +9913,8 @@ private void updateSuggestions() {
99119913 suggestionInfo .suggestionIndex = DELETE_TEXT ;
99129914 suggestionInfo .text .replace (0 , suggestionInfo .text .length (),
99139915 getContext ().getString (com .android .internal .R .string .deleteText ));
9916+ suggestionInfo .text .setSpan (suggestionInfo .highlightSpan , 0 , 0 ,
9917+ Spanned .SPAN_EXCLUSIVE_EXCLUSIVE );
99149918 mNumberOfSuggestions ++;
99159919
99169920 if (mSuggestionRangeSpan == null ) mSuggestionRangeSpan = new SuggestionRangeSpan ();
@@ -9939,8 +9943,7 @@ private void highlightTextDifferences(SuggestionInfo suggestionInfo, int unionSt
99399943 suggestionInfo .suggestionStart = spanStart - unionStart ;
99409944 suggestionInfo .suggestionEnd = suggestionInfo .suggestionStart
99419945 + suggestionInfo .text .length ();
9942-
9943- suggestionInfo .text .clearSpans ();
9946+
99449947 suggestionInfo .text .setSpan (suggestionInfo .highlightSpan , 0 ,
99459948 suggestionInfo .text .length (), Spanned .SPAN_EXCLUSIVE_EXCLUSIVE );
99469949
0 commit comments