From: Juergen Spitzmueller Date: Mon, 29 Jun 2020 11:40:27 +0000 (+0200) Subject: Correctly initialize font (language) for multiple-cell paste (#11898) X-Git-Tag: 2.3.6~80 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b0c8dc54b477038f10a70fe83d7eedb2379c51a5;p=features.git Correctly initialize font (language) for multiple-cell paste (#11898) (cherry picked from commit 2cee820f718f8b2db3030dadc670d3855934096f) --- diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index dab14135b4..cad8c943de 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -1092,7 +1092,10 @@ void copySelection(Cursor const & cur, docstring const & plaintext) par.setLayout(bp.documentClass().plainLayout()); // Replace (column-separating) tabs by space (#4449) docstring const clean_text = subst(plaintext, '\t', ' '); - par.insert(0, clean_text, Font(), Change(Change::UNCHANGED)); + // For pasting into text, we set the language to the paragraph language + // (rather than the default_language which is always English; see #11898) + par.insert(0, clean_text, Font(sane_font, par.getParLanguage(bp)), + Change(Change::UNCHANGED)); pars.push_back(par); theCuts.push(make_pair(pars, bp.documentClassPtr())); } else { diff --git a/status.23x b/status.23x index c27b58f73a..4a465454e0 100644 --- a/status.23x +++ b/status.23x @@ -62,6 +62,8 @@ What's new - Do not paste tabulators when pasting multiple cell outside table (bug 4449). +- Fix language when pasting multiple cell outside table (bug 11898). + * INTERNALS