Skip to content

Commit

Permalink
Fixes negative end selection offset. (#6171)
Browse files Browse the repository at this point in the history
  • Loading branch information
slightfoot authored and jonahwilliams committed Sep 5, 2018
1 parent 0981731 commit 9f0ad8b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public boolean sendKeyEvent(KeyEvent event) {
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));
Expand Down

0 comments on commit 9f0ad8b

Please sign in to comment.