X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fparagraph_pimpl.C;h=426862c246e3f8d04151b46d8ac03ef240cc1268;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=ce44bf2968af07d391383a602972e70459741935;hpb=b937ae39f914155ba4ab4c2539eb002a12cfa1f7;p=lyx.git diff --git a/src/paragraph_pimpl.C b/src/paragraph_pimpl.C index ce44bf2968..426862c246 100644 --- a/src/paragraph_pimpl.C +++ b/src/paragraph_pimpl.C @@ -280,10 +280,10 @@ bool Paragraph::Pimpl::eraseChar(pos_type pos, bool trackChanges) return false; } - // Don't physically access nonexistent end-of-paragraph char + // Don't physically access the imaginary end-of-paragraph character. + // eraseChar() can only mark it as DELETED. A physical deletion of + // end-of-par must be handled externally. if (pos == size()) { - // FIXME: change tracking (MG) - // how do we handle end-of-pars previously marked inserted? return false; } @@ -337,7 +337,7 @@ bool Paragraph::Pimpl::eraseChar(pos_type pos, bool trackChanges) int Paragraph::Pimpl::eraseChars(pos_type start, pos_type end, bool trackChanges) { BOOST_ASSERT(start >= 0 && start <= size()); - BOOST_ASSERT(end > start && end <= size() + 1); + BOOST_ASSERT(end >= start && end <= size() + 1); pos_type i = start; for (pos_type count = end - start; count; --count) {