]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.C
re-enable mathrm toggling with C-m (was disabled by accident)
[lyx.git] / src / CutAndPaste.C
index 2081ec2765e66a773af54c9121e4443746f8bce0..df12c4de8d81a241a7044b0a11df46c232bb1ba8 100644 (file)
@@ -92,8 +92,10 @@ bool CutAndPaste::cutSelection(Paragraph * startpar, Paragraph ** endpar,
        
        if (!(*endpar) || startpar == (*endpar)) {
                // only within one paragraph
-               if (realcut)
+               if (realcut) {
                        buf = new Paragraph;
+                       buf->layout(startpar->layout());
+               }
                pos_type i = start;
                if (end > startpar->size())
                        end = startpar->size();
@@ -157,7 +159,7 @@ bool CutAndPaste::cutSelection(Paragraph * startpar, Paragraph ** endpar,
 
 
 bool CutAndPaste::copySelection(Paragraph * startpar, Paragraph * endpar,
-                               int start, int end, char tc)
+                                int start, int end, char tc)
 {
        if (!startpar || (start > startpar->size()))
                return false;
@@ -169,6 +171,7 @@ bool CutAndPaste::copySelection(Paragraph * startpar, Paragraph * endpar,
        if (!endpar || startpar == endpar) {
                // only within one paragraph
                buf = new Paragraph;
+               buf->layout(startpar->layout());
                pos_type i = start;
                if (end > startpar->size())
                        end = startpar->size();