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

Commit 6ae1bc3b authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Revert "base: App crash when select suggestion's length more than specified."" into cm-10.2

parents 97dee3d9 cbcacc94
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