Index out of bound exception

onSelectionChanged(int selStart, int selEnd)
Line 446 - setSelection(spanEnd + 1);

This gives an IndexOutOfBoundsException when the user has more than two tokens in the text view and the user decides to hold down the keyboard backspace key to remove them.

I have put in a try and catch block so the application does not force close. I think a better implementation is needed but the change I have made is fine for me :)