Make sure template insert position is valid

pull/185/head
M66B 4 years ago
parent 01fe2161ee
commit 34dd2073ef

@ -1630,7 +1630,11 @@ public class FragmentCompose extends FragmentBase {
}
}, null, getContext());
etBody.getText().insert(etBody.getSelectionStart(), spanned);
int start = etBody.getSelectionStart();
if (start < 0)
start = 0;
etBody.getText().insert(start, spanned);
return true;
}

Loading…
Cancel
Save