Simplification

This commit is contained in:
M66B 2021-05-10 22:29:02 +02:00
parent 32635e5188
commit 3b765e947e
1 changed files with 1 additions and 12 deletions

View File

@ -437,18 +437,7 @@ public class FragmentCompose extends FragmentBase {
int first = text.substring(0, last).lastIndexOf(',');
first = (first < 0 ? 0 : first + 1);
if (first == start && last + 1 == end) {
String selected = et.getText().subSequence(start, end).toString();
int gt = selected.lastIndexOf('<');
int lt = selected.lastIndexOf('>');
if (gt >= 0 && lt >= 0 && gt < lt) {
et.setSelection(start + gt + 1, start + lt);
return true;
}
} else {
et.setSelection(first, last + 1);
return true;
}
et.setSelection(first, last + 1);
return false;
}