Do not track deletion of empty paragraph

Fixes #10412
This commit is contained in:
Juergen Spitzmueller 2020-01-11 18:11:26 +01:00
parent 4718d63fc3
commit ac8aa981db

View File

@ -1733,7 +1733,8 @@ bool Text::backspace(Cursor & cur)
Cursor prev_cur = cur;
--prev_cur.pit();
if (!prev_cur.paragraph().isMergedOnEndOfParDeletion(cur.buffer()->params().track_changes)) {
if (cur.paragraph().size() > 0
&& !prev_cur.paragraph().isMergedOnEndOfParDeletion(cur.buffer()->params().track_changes)) {
cur.recordUndo(prev_cur.pit(), prev_cur.pit());
prev_cur.paragraph().setChange(prev_cur.lastpos(), Change(Change::DELETED));
setCursorIntern(cur, prev_cur.pit(), prev_cur.lastpos());