mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Do not use English, but the context language, when pasting from LaTeX
Fixes: #9199
(cherry picked from commit e85704020b
)
This commit is contained in:
parent
c285b4f8c3
commit
6c64844d3b
@ -1225,6 +1225,10 @@ bool pasteClipboardText(Cursor & cur, ErrorList & errorList, bool asParagraphs,
|
||||
Buffer buffer("", false);
|
||||
buffer.setUnnamed(true);
|
||||
available = buffer.importString(names[i], text, errorList);
|
||||
// TeX2lyx (also used in the HTML chain) assumes English as document language
|
||||
// if no language is explicitly set (as is the case here).
|
||||
// We thus reset the temp buffer's language to the context language
|
||||
buffer.changeLanguage(buffer.language(), cur.getFont().language());
|
||||
if (available)
|
||||
available = !buffer.paragraphs().empty();
|
||||
if (available && !buffer.paragraphs()[0].empty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user