From: Juergen Spitzmueller Date: Wed, 4 Oct 2023 11:49:34 +0000 (+0200) Subject: Amend 3f0bb8aa43af X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=90307cf2126d9f492b5a234285b073366bbee78e;p=features.git Amend 3f0bb8aa43af Account for the paragraph marker --- diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index cfa6625d56..7fd76f98bc 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -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