* \ct_additions_underlined true|false: determines whether additions in change tracking
are underlined in the workarea (default: true).
+* \ct_markup_copied true|false: determines whether change tracking markup should be
+ preserved on copy/paste (default: false).
+
!!!The following pref variables were changed in 2.4:
#LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 591
+\lyxformat 592
\begin_document
\begin_header
\save_transient_properties true
\end_layout
\begin_layout Verbatim
-
This is Verbatim.
\end_layout
\begin_layout Verbatim
\noindent
\align block
-
The following 2 lines are empty:
\end_layout
\end_layout
\begin_layout Verbatim
-
Almost everything is allowed in Verbatim:"%&$§#~'`
\backslash
}][{|
\end_layout
\begin_layout Verbatim*
-
This is Verbatim*.
\end_layout
\family default
the cursor jumps from the end of a word to the end of the next word.
Normally it jumps from the beginning to the beginning.
+\change_inserted -712698321 1578924606
+
+\end_layout
+
+\begin_layout Standard
+
+\change_inserted -712698321 1578924785
+The option
+\family sans
+Keep change tracking markup on copy and paste
+\family default
+ is for users who don't want tracked changes to be dissolved on copy and
+ paste operations (i.
+\begin_inset space \thinspace{}
+\end_inset
+
+e., inserted as new text with the deletions removed).
+ If this is checked, the change-tracked text will be copied and pasted as
+ is, independent if changes are currently tracked or not.
+ This also applies to wrapping to\SpecialChar breakableslash
+dissolving from insets.
+\change_unchanged
+
\end_layout
\begin_layout Standard
#LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 591
+\lyxformat 592
\begin_document
\begin_header
\save_transient_properties true
\end_layout
\begin_layout Verbatim
+
Dies ist Unformatiert.
\end_layout
\begin_layout Verbatim
+
Die folgenden 2 Zeilen sind leer:
\end_layout
\end_layout
\begin_layout Verbatim
+
Fast alles ist in Unformatiert erlaubt:"%&$§#~'`
\backslash
}][{|
\end_layout
\begin_layout Verbatim*
+
Dies ist Unformatiert*.
\end_layout
Normalerweise springt er von Anfang zu Anfang.
\end_layout
+\begin_layout Standard
+Die Option
+\family sans
+Änderungsmarkierungen beim Kopieren und Einfügen behalten
+\family default
+ können Sie auswählen, wenn Sie nicht möchten, dass verfolgte Änderungen
+ beim Kopieren und Einfügen aufgelöst werden (d.
+\begin_inset space \thinspace{}
+\end_inset
+
+h., dass als gelöscht markierter Text entfernt und alles andere als neu eingefügt
+ wird).
+ Wenn dies ausgewählt ist, wird der kopierte Text mit den Markierungen eingefügt
+, unabhängig davon, ob Änderungen gerade verfolgt werden oder nicht.
+ Das betrifft auch das Umwandeln von Text in\SpecialChar breakableslash
+von Einfügungen.
+\end_layout
+
\begin_layout Standard
Die Option
\family sans
# Add ct_additions_underlined.
# No convergence necessary.
+# Incremented to format 32, by spitz
+# Add ct_markup_copied.
+# No convergence necessary.
+
# NOTE: The format should also be updated in LYXRC.cpp and
# in configure.py.
[ 28, [remove_date_insert_format]],
[ 29, [remove_use_pixmap_cache]],
[ 30, []],
- [ 31, []]
+ [ 31, []],
+ [ 32, []]
]
tmpbuf->eraseChar(i--, false);
}
- tmpbuf->setChange(Change(buffer.params().track_changes ?
- Change::INSERTED : Change::UNCHANGED));
+ if (lyxrc.ct_markup_copied)
+ tmpbuf->setChange(Change(buffer.params().track_changes ?
+ Change::INSERTED : Change::UNCHANGED));
}
bool const empty = pars[pit].empty();
void putClipboard(ParagraphList const & paragraphs,
- DocumentClassConstPtr docclass, docstring const & plaintext)
+ DocumentClassConstPtr docclass, docstring const & plaintext,
+ BufferParams const bp)
{
Buffer * buffer = copyToTempBuffer(paragraphs, docclass);
if (!buffer) // already asserted in copyToTempBuffer()
// applications, the number that can parse it should go up in the future.
buffer->params().html_math_output = BufferParams::MathML;
+ if (lyxrc.ct_markup_copied) {
+ // Copy authors to the params. We need those pointers.
+ for (Author const & a : bp.authors())
+ buffer->params().authors().record(a);
+ }
+
// Make sure MarkAsExporting is deleted before buffer is
{
// The Buffer is being used to export. This is necessary so that the
// do not copy text (also nested in insets) which is marked as
// deleted, unless the whole selection was deleted
- if (!isFullyDeleted(copy_pars))
- acceptChanges(copy_pars, buf.params());
- else
- rejectChanges(copy_pars, buf.params());
+ if (!lyxrc.ct_markup_copied) {
+ if (!isFullyDeleted(copy_pars))
+ acceptChanges(copy_pars, buf.params());
+ else
+ rejectChanges(copy_pars, buf.params());
+ }
// do some final cleanup now, to make sure that the paragraphs
// Even if there is no selection.
if (putclip)
putClipboard(cuts[0].first, cuts[0].second,
- cur.selectionAsString(true, true));
+ cur.selectionAsString(true, true), bp);
}
if (begpit != endpit)
theCuts.push(make_pair(pars, bp.documentClassPtr()));
// stuff the selection onto the X clipboard, from an explicit copy request
- putClipboard(theCuts[0].first, theCuts[0].second, plaintext);
+ putClipboard(theCuts[0].first, theCuts[0].second, plaintext, bp);
}
}
// stuff the selection onto the X clipboard, from an explicit copy request
- putClipboard(theCuts[0].first, theCuts[0].second, plaintext);
+ putClipboard(theCuts[0].first, theCuts[0].second, plaintext,
+ cur.buffer()->params());
}
void pasteParagraphList(Cursor & cur, ParagraphList const & parlist,
- DocumentClassConstPtr docclass, ErrorList & errorList,
- cap::BranchAction branchAction)
+ DocumentClassConstPtr docclass, ErrorList & errorList,
+ cap::BranchAction branchAction)
{
if (cur.inTexted()) {
Text * text = cur.text();
// The format should also be updated in configure.py, and conversion code
// should be added to prefs2prefs_prefs.py.
-static unsigned int const LYXRC_FILEFORMAT = 31; // lasgouttes: add \ct_additions_underlined
+static unsigned int const LYXRC_FILEFORMAT = 32; // spitz: add \ct_markup_copied
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
{ "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
{ "\\converter_cache_maxage", LyXRC::RC_CONVERTER_CACHE_MAXAGE },
{ "\\copier", LyXRC::RC_COPIER },
{ "\\ct_additions_underlined", LyXRC::RC_CT_ADDITIONS_UNDERLINED },
+ { "\\ct_markup_copied", LyXRC::RC_CT_MARKUP_COPIED },
{ "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
{ "\\cursor_width", LyXRC::RC_CURSOR_WIDTH },
{ "\\def_file", LyXRC::RC_DEFFILE },
lexrc >> ct_additions_underlined;
break;
+ case RC_CT_MARKUP_COPIED:
+ lexrc >> ct_markup_copied;
+ break;
+
case RC_CURSOR_FOLLOWS_SCROLLBAR:
lexrc >> cursor_follows_scrollbar;
break;
if (tag != RC_LAST)
break;
// fall through
+ case RC_CT_MARKUP_COPIED:
+ if (ignore_system_lyxrc ||
+ ct_markup_copied
+ != system_lyxrc.ct_markup_copied) {
+ os << "\\ct_markup_copied "
+ << convert<string>(ct_markup_copied) << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
+ // fall through
case RC_CURSOR_FOLLOWS_SCROLLBAR:
if (ignore_system_lyxrc ||
cursor_follows_scrollbar
case LyXRC::RC_CONVERTER_CACHE_MAXAGE:
case LyXRC::RC_COPIER:
case LyXRC::RC_CT_ADDITIONS_UNDERLINED:
+ case LyXRC::RC_CT_MARKUP_COPIED:
case LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR:
case LyXRC::RC_SCROLL_BELOW_DOCUMENT:
case LyXRC::RC_GUI_LANGUAGE:
RC_CONVERTER_CACHE_MAXAGE,
RC_COPIER,
RC_CT_ADDITIONS_UNDERLINED,
+ RC_CT_MARKUP_COPIED,
RC_CURSOR_FOLLOWS_SCROLLBAR,
RC_CURSOR_WIDTH,
RC_DEFAULT_DECIMAL_SEP,
///
bool ct_additions_underlined = true;
///
+ bool ct_markup_copied = false;
+ ///
bool scroll_below_document = false;
///
enum MacroEditStyle {
// but we'll try the cheaper solution here.
cur.buffer()->clearReferenceCache();
- // Do not revive deleted text
- lyx::acceptChanges(plist, b.params());
+ if (!lyxrc.ct_markup_copied)
+ // Do not revive deleted text
+ lyx::acceptChanges(plist, b.params());
// ERT paragraphs have the Language latex_language.
// This is invalid outside of ERT, so we need to
this, SIGNAL(changed()));
connect(macLikeCursorMovementCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
+ connect(copyCTMarkupCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
connect(sortEnvironmentsCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(groupEnvironmentsCB, SIGNAL(clicked()),
rc.cursor_follows_scrollbar = cursorFollowsCB->isChecked();
rc.scroll_below_document = scrollBelowCB->isChecked();
rc.mac_like_cursor_movement = macLikeCursorMovementCB->isChecked();
+ rc.ct_markup_copied = copyCTMarkupCB->isChecked();
rc.sort_layouts = sortEnvironmentsCB->isChecked();
rc.group_layouts = groupEnvironmentsCB->isChecked();
switch (macroEditStyleCO->currentIndex()) {
cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
scrollBelowCB->setChecked(rc.scroll_below_document);
macLikeCursorMovementCB->setChecked(rc.mac_like_cursor_movement);
+ copyCTMarkupCB->setChecked(rc.ct_markup_copied);
sortEnvironmentsCB->setChecked(rc.sort_layouts);
groupEnvironmentsCB->setChecked(rc.group_layouts);
macroEditStyleCO->setCurrentIndex(rc.macro_edit_style);
+<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PrefEditUi</class>
<widget class="QWidget" name="PrefEditUi">
<rect>
<x>0</x>
<y>0</y>
- <width>385</width>
- <height>435</height>
+ <width>494</width>
+ <height>583</height>
</rect>
</property>
<property name="sizePolicy">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
+ <item row="2" column="0" colspan="2">
+ <widget class="QCheckBox" name="scrollBelowCB">
+ <property name="text">
+ <string>Scroll &below end of document</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" colspan="2">
+ <widget class="QCheckBox" name="sortEnvironmentsCB">
+ <property name="text">
+ <string>Sort &environments alphabetically</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="2">
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>200</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
<item row="0" column="0">
<widget class="QCheckBox" name="cursorFollowsCB">
<property name="text">
</item>
</layout>
</item>
- <item row="1" column="1" colspan="2">
- <spacer name="horizontalSpacer_3">
+ <item row="7" column="2">
+ <spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>200</width>
+ <width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
- <item row="2" column="0" colspan="2">
- <widget class="QCheckBox" name="scrollBelowCB">
+ <item row="6" column="0" colspan="2">
+ <widget class="QCheckBox" name="groupEnvironmentsCB">
<property name="text">
- <string>Scroll &below end of document</string>
+ <string>&Group environments by their category</string>
</property>
</widget>
</item>
</property>
</widget>
</item>
- <item row="4" column="0" colspan="2">
- <widget class="QCheckBox" name="sortEnvironmentsCB">
- <property name="text">
- <string>Sort &environments alphabetically</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0" colspan="2">
- <widget class="QCheckBox" name="groupEnvironmentsCB">
- <property name="text">
- <string>&Group environments by their category</string>
- </property>
- </widget>
- </item>
- <item row="6" column="0" colspan="2">
+ <item row="7" column="0" colspan="2">
<widget class="QComboBox" name="macroEditStyleCO">
<item>
<property name="text">
</item>
</widget>
</item>
- <item row="6" column="2">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <item row="4" column="0">
+ <widget class="QCheckBox" name="copyCTMarkupCB">
+ <property name="toolTip">
+ <string>If this is checked, deleted and added text in change tracking mde will not be resolved on copy/paste operations and when moving content from/to insets</string>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
+ <property name="text">
+ <string>&Keep change tracking markup on copy and paste</string>
</property>
- </spacer>
+ </widget>
</item>
</layout>
</widget>