commit 8bf7e691bc22df58f11859421e240c2e912e4ef3
Author: Juergen Spitzmueller <[email protected]>
Date: Tue Feb 6 14:10:12 2018 +0100
Do not use English, but the context language, when pasting from math
Fixes: #2596
(cherry picked from commit 92990adc236b19277a80c82ffa0580f5d1555bb0)
---
src/CutAndPaste.cpp | 5 ++++-
status.23x | 3 +++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp
index 561e3e4..bf2986d 100644
--- a/src/CutAndPaste.cpp
+++ b/src/CutAndPaste.cpp
@@ -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()));
}
diff --git a/status.23x b/status.23x
index c186061..4e2348d 100644
--- a/status.23x
+++ b/status.23x
@@ -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