From 41ebc1f9ae9d69b881dffb6fcee77b5041e510e6 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 29 Jun 2020 12:51:15 +0200 Subject: [PATCH] Do not paste \t when pasting multiple table columns outside table (#4449) (cherry picked from commit 6dd990560e439dd8a1c07230519033253e1ce77c) --- src/CutAndPaste.cpp | 4 +++- status.23x | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.5