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

Commit 067a50c3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 3e3c71a2 7cbea337
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2753,7 +2753,8 @@ public class Editor {
                suggestions[suggestionInfo.suggestionIndex] = originalText;

                // Restore previous SuggestionSpans
                final int lengthDifference = suggestion.length() - (spanEnd - spanStart);
                final int realSuggestionLength = mTextView.getText().toString().length();
                final int lengthDifference = realSuggestionLength - (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