From: Juergen Spitzmueller Date: Mon, 29 Jun 2020 10:51:15 +0000 (+0200) Subject: Do not paste \t when pasting multiple table columns outside table (#4449) X-Git-Tag: 2.3.6~81 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=41ebc1f9ae9d69b881dffb6fcee77b5041e510e6;p=features.git Do not paste \t when pasting multiple table columns outside table (#4449) (cherry picked from commit 6dd990560e439dd8a1c07230519033253e1ce77c) --- diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 9507b2b57f..dab14135b4 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -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 { diff --git a/status.23x b/status.23x index a536e01293..c27b58f73a 100644 --- a/status.23x +++ b/status.23x @@ -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