]> git.lyx.org Git - features.git/commitdiff
Fix assertion on paste with empty pars
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 4 Oct 2023 11:40:38 +0000 (13:40 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 4 Oct 2023 11:40:38 +0000 (13:40 +0200)
src/CutAndPaste.cpp

index fde103acef95260f9b60c005ff6a96e587902d4d..cfa6625d5618a0096a8b5c27d0932953cb8d5017 100644 (file)
@@ -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