]> git.lyx.org Git - features.git/commitdiff
* CutAndPaste.cpp (eraseSelectionHelper): when the last paragraph that
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 18 Feb 2008 10:16:43 +0000 (10:16 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 18 Feb 2008 10:16:43 +0000 (10:16 +0000)
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

index 9347e3c76a43f4678ebb4159b7a69219f864f564..1dfd91e6afde8c6978a9e52579d7146e8bd44827 100644 (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);