Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Xlythe committed Feb 6, 2013
1 parent a34beeb commit 6c85738
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/com/android2/calculator3/view/CalculatorEditText.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ public void afterTextChanged(Editable s) {
updating = true;
int selectionHandle = getSelectionStart();
setText(Html.fromHtml(mEquationFormatter.insertSupscripts(input)));
try {
setSelection(selectionHandle);
}
catch(IndexOutOfBoundsException e) {
setSelection(1);
}
setSelection(Math.min(selectionHandle, getText().length()));
updating = false;
}
});
Expand Down

0 comments on commit 6c85738

Please sign in to comment.