Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbcacc94 authored by Dan Pasanen's avatar Dan Pasanen
Browse files

Revert "base: App crash when select suggestion's length more than specified."

This reverts commit dcf75fbf.

Change-Id: I6d236f16e9c428b06caf4423903839d54cf24bd0
parent 8b9e41d7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2710,8 +2710,7 @@ public class Editor {
                suggestions[suggestionInfo.suggestionIndex] = originalText;

                // Restore previous SuggestionSpans
                final int realSuggestionLength = mTextView.getText().toString().length();
                final int lengthDifference = realSuggestionLength - (spanEnd - spanStart);
                final int lengthDifference = suggestion.length() - (spanEnd - spanStart);
                for (int i = 0; i < length; i++) {
                    // Only spans that include the modified region make sense after replacement
                    // Spans partially included in the replaced region are removed, there is no