mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Small behavior improvement
This commit is contained in:
parent
04a53e8014
commit
bd4b577af3
1 changed files with 5 additions and 1 deletions
|
@ -2408,7 +2408,11 @@ public class FragmentCompose extends FragmentBase {
|
||||||
languages = new ArrayList<>();
|
languages = new ArrayList<>();
|
||||||
|
|
||||||
int s = etBody.getSelectionStart();
|
int s = etBody.getSelectionStart();
|
||||||
if (s > 0 && s == etBody.length() && etBody.getText().charAt(s - 1) == '\n')
|
Editable edit = etBody.getText();
|
||||||
|
if (s > 1 && s <= edit.length() &&
|
||||||
|
edit.charAt(s - 1) == '\n' &&
|
||||||
|
edit.charAt(s - 2) != '\n' &&
|
||||||
|
(s == edit.length() || edit.charAt(s) == '\n') )
|
||||||
etBody.setSelection(s - 1, s - 1);
|
etBody.setSelection(s - 1, s - 1);
|
||||||
|
|
||||||
Pair<Integer, Integer> paragraph = StyleHelper.getParagraph(etBody);
|
Pair<Integer, Integer> paragraph = StyleHelper.getParagraph(etBody);
|
||||||
|
|
Loading…
Reference in a new issue