diff --git a/app/src/main/java/helium314/keyboard/latin/RichInputConnection.java b/app/src/main/java/helium314/keyboard/latin/RichInputConnection.java index 7d34df49b..f7e8bcc03 100644 --- a/app/src/main/java/helium314/keyboard/latin/RichInputConnection.java +++ b/app/src/main/java/helium314/keyboard/latin/RichInputConnection.java @@ -439,7 +439,7 @@ public final class RichInputConnection implements PrivateCommandPerformer { // test for this explicitly) if (INVALID_CURSOR_POSITION != mExpectedSelStart && (cachedLength >= n || cachedLength >= mExpectedSelStart)) { - final StringBuilder s = new StringBuilder(mCommittedTextBeforeComposingText); + final StringBuilder s = new StringBuilder(mCommittedTextBeforeComposingText.toString()); // We call #toString() here to create a temporary object. // In some situations, this method is called on a worker thread, and it's possible // the main thread touches the contents of mComposingText while this worker thread