Improved insert template workaround

This commit is contained in:
M66B 2020-09-14 18:22:54 +02:00
parent 1c42335526
commit 5b494e5ca0
1 changed files with 5 additions and 2 deletions

View File

@ -1636,8 +1636,11 @@ public class FragmentCompose extends FragmentBase {
}, null, getContext()); }, null, getContext());
int start = etBody.getSelectionStart(); int start = etBody.getSelectionStart();
if (start < 0) if (start < 0) {
start = 0; start = etBody.length() - 1;
if (start < 0)
start = 0;
}
etBody.getText().insert(start, spanned); etBody.getText().insert(start, spanned);