diff --git a/src/Text2.cpp b/src/Text2.cpp index e0f5963f8b..d6f5a83ef0 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -850,7 +850,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur, && old.pos() == cur[depth].pos(); // If the chars around the old cursor were spaces, delete some of - // them , but only if the cursor has really moved. + // them, but only if the cursor has really moved. if (!same_par_pos) { // find range of spaces around cursors int from = old.pos(); @@ -868,6 +868,9 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur, if (from != to && from > 0 && to < oldpar.size()) ++from; + if (same_par && cur.pos() > from && cur.pos() < to) + ++from; + // Remove spaces and adapt cursor. if (from < to) { oldpar.eraseChars(from, to, cur.buffer()->params().track_changes); @@ -884,7 +887,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur, } } - // only do our magic if we changed paragraph + // only do our other magic if we changed paragraph if (same_par) return false; diff --git a/status.23x b/status.23x index 9680d6f1f3..386df1ad94 100644 --- a/status.23x +++ b/status.23x @@ -39,6 +39,8 @@ What's new - Insert new graphics inset on the correct cursor position. +- Fix regression where spaces are disappearing when editing text (bug 11412). + * DOCUMENTATION AND LOCALIZATION