From 85c0bf5e165b14dfe7a81a815ebc16e27551b684 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 18 Feb 2008 10:16:43 +0000 Subject: [PATCH] * 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 --- src/CutAndPaste.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 9347e3c76a..1dfd91e6af 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -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);