* CutAndPaste.cpp (eraseSelectionHelper): when the last paragraph that

is cut is completely erased, remove it regardless of its layout (fixes
	bug 3995).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23054 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-02-18 10:16:43 +00:00
parent c075a285a0
commit 85c0bf5e16

View File

@ -310,7 +310,9 @@ PitPosPair eraseSelectionHelper(BufferParams const & params,
// Separate handling of paragraph break:
if (merge && pit != endpit &&
(pit + 1 != endpit || pars[pit].hasSameLayout(pars[endpit]))) {
(pit + 1 != endpit
|| pars[pit].hasSameLayout(pars[endpit])
|| pars[endpit].size() == endpos)) {
if (pit + 1 == endpit)
endpos += pars[pit].size();
mergeParagraph(params, pars, pit);