On Thu, Jul 27, 2023 at 06:07:30PM +0200, Pavel Sanda wrote:
> current behaviour which joins the lines by default?

As it turns out, the current behaviour is more subtle:
the newlines are actually preserved for some layouts
(those having parbreakIsNewline set to 1).

The patch for newline preservation by default is trivial
(see attachment). Let's wait for the feedback now. 

Pavel
diff --git a/src/Text.cpp b/src/Text.cpp
index 9dff2b37ab..9e5bf5ff75 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -4891,8 +4891,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        if (theClipboard().isInternal())
                                pasteFromStack(cur, 
bv->buffer().errorList("Paste"), 0);
                        else if (theClipboard().hasTextContents()) {
-                               if (pasteClipboardText(cur, 
bv->buffer().errorList("Paste"),
-                                                      
!cur.paragraph().parbreakIsNewline(),
+                               if (pasteClipboardText(cur, 
bv->buffer().errorList("Paste"), 0,
                                                           
Clipboard::AnyTextType))
                                        tryGraphics = false;
                        }
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to