]> git.lyx.org Git - features.git/commitdiff
Amend 3f0bb8aa43af
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 4 Oct 2023 11:49:34 +0000 (13:49 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 4 Oct 2023 11:49:34 +0000 (13:49 +0200)
Account for the paragraph marker

src/CutAndPaste.cpp

index cfa6625d5618a0096a8b5c27d0932953cb8d5017..7fd76f98bcbabe0dc622ba95470f47feb7735875 100644 (file)
@@ -297,11 +297,13 @@ 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 && tmpbuf->size() > 0) {
-                               if (!isFullyDeleted(insertion))
-                                       tmpbuf->acceptChanges(0, tmpbuf->size());
-                               else
-                                       tmpbuf->rejectChanges(0, tmpbuf->size());
+                       if (buffer.params().track_changes) {
+                               if (tmpbuf->size() > 0) {
+                                   if (!isFullyDeleted(insertion))
+                                           tmpbuf->acceptChanges(0, tmpbuf->size());
+                                   else
+                                           tmpbuf->rejectChanges(0, tmpbuf->size());
+                               }
                                tmpbuf->setChange(Change(Change::INSERTED));
                        }
                } else