commit 3f0bb8aa43af9647f048b2904a90392cd36748fa
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Wed Oct 4 13:40:38 2023 +0200

    Fix assertion on paste with empty pars
---
 src/CutAndPaste.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp
index fde103a..cfa6625 100644
--- a/src/CutAndPaste.cpp
+++ b/src/CutAndPaste.cpp
@@ -297,7 +297,7 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList 
const & parlist,
                        // Only remove deleted text and change
                        // the rest to inserted if ct is active,
                        // otherwise leave markup as is
-                       if (buffer.params().track_changes) {
+                       if (buffer.params().track_changes && tmpbuf->size() > 
0) {
                                if (!isFullyDeleted(insertion))
                                        tmpbuf->acceptChanges(0, 
tmpbuf->size());
                                else
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to