From: Juergen Spitzmueller Date: Wed, 4 Oct 2023 11:40:38 +0000 (+0200) Subject: Fix assertion on paste with empty pars X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3f0bb8aa43af9647f048b2904a90392cd36748fa;p=features.git Fix assertion on paste with empty pars --- 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