From 3f0bb8aa43af9647f048b2904a90392cd36748fa Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 4 Oct 2023 13:40:38 +0200 Subject: [PATCH] Fix assertion on paste with empty pars --- src/CutAndPaste.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index fde103acef..cfa6625d56 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