From 90307cf2126d9f492b5a234285b073366bbee78e Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 4 Oct 2023 13:49:34 +0200 Subject: [PATCH] Amend 3f0bb8aa43af Account for the paragraph marker --- src/CutAndPaste.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 -- 2.39.5