commit 2cee820f718f8b2db3030dadc670d3855934096f
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Mon Jun 29 13:40:27 2020 +0200

    Correctly initialize font (language) for multiple-cell paste (#11898)
---
 src/CutAndPaste.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp
index f002de0..4abcbaa 100644
--- a/src/CutAndPaste.cpp
+++ b/src/CutAndPaste.cpp
@@ -1098,7 +1098,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 {
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to