]> git.lyx.org Git - lyx.git/commitdiff
Do not paste \t when pasting multiple table columns outside table (#4449)
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 29 Jun 2020 10:51:15 +0000 (12:51 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 30 Jun 2020 06:57:07 +0000 (08:57 +0200)
(cherry picked from commit 6dd990560e439dd8a1c07230519033253e1ce77c)

src/CutAndPaste.cpp
status.23x

index 9507b2b57f1fb70b7160da88b25ad212b3366d6d..dab14135b456859ed4ab7bd4ee6eb59062d9b7b6 100644 (file)
@@ -1090,7 +1090,9 @@ void copySelection(Cursor const & cur, docstring const & plaintext)
                Paragraph par;
                BufferParams const & bp = cur.buffer()->params();
                par.setLayout(bp.documentClass().plainLayout());
-               par.insert(0, plaintext, Font(), Change(Change::UNCHANGED));
+               // Replace (column-separating) tabs by space (#4449)
+               docstring const clean_text = subst(plaintext, '\t', ' ');
+               par.insert(0, clean_text, Font(), Change(Change::UNCHANGED));
                pars.push_back(par);
                theCuts.push(make_pair(pars, bp.documentClassPtr()));
        } else {
index a536e012933fcf8e3e4ead91ee4408a8f60382d8..c27b58f73a73792ddf3bc7272d185fccf79d5183 100644 (file)
@@ -60,6 +60,8 @@ What's new
 
 - Fix background color of collapsible insets with sublabel.
 
+- Do not paste tabulators when pasting multiple cell outside table (bug 4449).
+
 
 * INTERNALS