]> git.lyx.org Git - features.git/commitdiff
Small bugfix for CutAndPaste segfault
authorJürgen Vigna <jug@sad.it>
Thu, 27 Apr 2000 09:05:04 +0000 (09:05 +0000)
committerJürgen Vigna <jug@sad.it>
Thu, 27 Apr 2000 09:05:04 +0000 (09:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@701 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/CutAndPaste.C

index 6ffaee49549498209cc575d99c21f9d0bda04ae2..dcc7ef2506ded08402d93f14ba6f64ec0d467fc4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-27  Juergen Vigna  <jug@sad.it>
+
+       * src/CutAndPaste.C (pasteSelection): last paragraph was not returned
+       correctly only last pos this was a bug.
+
 2000-04-26  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * release of lyx-1.1.5pre1
index d28498c7a0fe21268c55409aa6baf4996dd37f43..0763d70b5a601adef76de098e91ffb163d25a118 100644 (file)
@@ -325,8 +325,8 @@ bool CutAndPaste::pasteSelection(LyXParagraph ** par, LyXParagraph ** endpar,
        (*par)->ParFromPos(pos)->PasteParagraph();
        
        // store the new cursor position
-       tmppar = lastbuffer;
-       tmppos = lastbuffer->Last();
+       *par = lastbuffer;
+       pos  = lastbuffer->Last();
        
        // maybe some pasting
        if (lastbuffer->Next() && paste_the_end) {
@@ -343,7 +343,6 @@ bool CutAndPaste::pasteSelection(LyXParagraph ** par, LyXParagraph ** endpar,
        }
        // restore the simple cut buffer
        buf = simple_cut_clone;
-       pos = tmppos;
     }
 
     return true;