[LyX/master] Fix pasting from LaTeX with keepEmpty environment in first paragraph (#13295)
Juergen Spitzmueller <[email protected]>
| Newsgroups | gmane.editors.lyx.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit a2e701af72513a7b4dcf5c4e8d5f63523dbf5904 Author: Juergen Spitzmueller <[email protected]> Date: Wed Apr 8 19:12:13 2026 +0200 Fix pasting from LaTeX with keepEmpty environment in first paragraph (#13295) --- src/CutAndPaste.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index d5c36b9670..7dc654448b 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -1357,7 +1357,7 @@ bool pasteClipboardText(Cursor & cur, ErrorList & errorList, bool asParagraphs, available = buffer.importString(names[i], text, errorList); if (available) available = !buffer.paragraphs().empty(); - if (available && !buffer.paragraphs()[0].empty()) { + if (available && (!buffer.paragraphs()[0].empty() || buffer.paragraphs()[0].layout().keepempty)) { // 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 -- lyx-cvs mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-cvs