[LyX/master] Always mark pasted stuff as changed with ct on

Juergen Spitzmueller spitz at lyx.org
Sun Dec 6 08:33:46 UTC 2020


commit 22193601bffd0dac4441e427780532c4ed27870f
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sun Dec 6 10:00:47 2020 +0100

    Always mark pasted stuff as changed with ct on
    
    independent of "Keep change tracking markup on copy and paste" pref.
    
    Probably addresses #11973
---
 src/CutAndPaste.cpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp
index b6aec8f..fc555c1 100644
--- a/src/CutAndPaste.cpp
+++ b/src/CutAndPaste.cpp
@@ -277,7 +277,13 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
 					tmpbuf->eraseChar(i--, false);
 		}
 
-		if (lyxrc.ct_markup_copied)
+		if (lyxrc.ct_markup_copied) {
+			// Only change to inserted if ct is active,
+			// otherwise leave markup as is
+			if (buffer.params().track_changes)
+				tmpbuf->setChange(Change(Change::INSERTED));
+		} else
+			// Resolve all markup to inserted or unchanged
 			tmpbuf->setChange(Change(buffer.params().track_changes ?
 						 Change::INSERTED : Change::UNCHANGED));
 	}


More information about the lyx-cvs mailing list