提交 9f0ad8b7 编写于 作者: S Simon Lightfoot 提交者: Jonah Williams

Fixes negative end selection offset. (#6171)

上级 0981731f
......@@ -158,7 +158,7 @@ class InputConnectionAdaptor extends BaseInputConnection {
int character = event.getUnicodeChar();
if (character != 0) {
int selStart = Math.max(0, Selection.getSelectionStart(mEditable));
int selEnd = Selection.getSelectionEnd(mEditable);
int selEnd = Math.max(0, Selection.getSelectionEnd(mEditable));
if (selEnd != selStart)
mEditable.delete(selStart, selEnd);
mEditable.insert(selStart, String.valueOf((char) character));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册