int previousSelectionStart, int previousSelectionLength) {
updateSelection();
}
});
textArea.getTextAreaCharacterListeners().add(new TextAreaCharacterListener() {
@Override
public void charactersRemoved(TextArea textArea, int index, int count) {
updateSelection();
}