X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fparagraph.C;h=4bfe0db3fe55894c10394b46d69e98e82a5e8efb;hb=6c2e78e12855d8661eb289ded3dc8722748863b8;hp=2cbbf6180bc674c7bf4dcdebc529d706d81fc090;hpb=bcf1a16e10b2f4344e191590f1e54a7e3d6d6a93;p=lyx.git diff --git a/src/paragraph.C b/src/paragraph.C index 2cbbf6180b..4bfe0db3fe 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -563,9 +563,8 @@ int Paragraph::stripLeadingSpaces() return 0; int i = 0; - while (!empty() && (isNewline(0) || isLineSeparator(0))) { - // Set Change::Type to Change::INSERTED to quietly remove it - setChange(0, Change::INSERTED); + while (!empty() && (isNewline(0) || isLineSeparator(0)) + && (lookupChange(0) != Change::DELETED)) { erase(0); ++i; }