]> git.lyx.org Git - features.git/commitdiff
Do not use English, but the context language, when pasting from math
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 6 Feb 2018 13:10:12 +0000 (14:10 +0100)
committerRichard Heck <rgheck@lyx.org>
Sat, 17 Mar 2018 19:44:05 +0000 (15:44 -0400)
Fixes: #2596
(cherry picked from commit 92990adc236b19277a80c82ffa0580f5d1555bb0)

src/CutAndPaste.cpp
status.23x

index 561e3e4b57c4e45c64fb7085e058877a44919c67..bf2986decd934b29a719dab51f1da3490a365ff5 100644 (file)
@@ -1040,7 +1040,10 @@ void copySelectionToStack(Cursor const & cur, CutStack & cutstack)
                BufferParams const & bp = cur.buffer()->params();
                // FIXME This should be the plain layout...right?
                par.setLayout(bp.documentClass().plainLayout());
-               par.insert(0, grabSelection(cur), 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 #2596)
+               par.insert(0, grabSelection(cur), Font(sane_font, par.getParLanguage(bp)),
+                          Change(Change::UNCHANGED));
                pars.push_back(par);
                cutstack.push(make_pair(pars, bp.documentClassPtr()));
        }
index c186061ad7ceee4ea4a7a917ecaa1c59c0b40d76..4e2348d12be55d28ba76109591c43602a6b41705 100644 (file)
@@ -49,6 +49,9 @@ What's new
 - Do not use English, but the context language, when pasting from LaTeX
   (bug 9199).
 
+- Do not use English, but the context language, when pasting from math
+  (bug 2596).
+
 
 * INTERNALS