@@ -9908,6 +9908,8 @@ private void updateSuggestions() {
99089908 suggestionInfo .suggestionIndex = ADD_TO_DICTIONARY ;
99099909 suggestionInfo .text .replace (0 , suggestionInfo .text .length (),
99109910 getContext ().getString (com .android .internal .R .string .addToDictionary ));
9911+ suggestionInfo .text .setSpan (suggestionInfo .highlightSpan , 0 , 0 ,
9912+ Spanned .SPAN_EXCLUSIVE_EXCLUSIVE );
99119913
99129914 mNumberOfSuggestions ++;
99139915 }
@@ -9919,6 +9921,8 @@ private void updateSuggestions() {
99199921 suggestionInfo .suggestionIndex = DELETE_TEXT ;
99209922 suggestionInfo .text .replace (0 , suggestionInfo .text .length (),
99219923 getContext ().getString (com .android .internal .R .string .deleteText ));
9924+ suggestionInfo .text .setSpan (suggestionInfo .highlightSpan , 0 , 0 ,
9925+ Spanned .SPAN_EXCLUSIVE_EXCLUSIVE );
99229926 mNumberOfSuggestions ++;
99239927
99249928 if (mSuggestionRangeSpan == null ) mSuggestionRangeSpan = new SuggestionRangeSpan ();
@@ -9947,8 +9951,7 @@ private void highlightTextDifferences(SuggestionInfo suggestionInfo, int unionSt
99479951 suggestionInfo .suggestionStart = spanStart - unionStart ;
99489952 suggestionInfo .suggestionEnd = suggestionInfo .suggestionStart
99499953 + suggestionInfo .text .length ();
9950-
9951- suggestionInfo .text .clearSpans ();
9954+
99529955 suggestionInfo .text .setSpan (suggestionInfo .highlightSpan , 0 ,
99539956 suggestionInfo .text .length (), Spanned .SPAN_EXCLUSIVE_EXCLUSIVE );
99549957
0 commit comments