X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCursor.cpp;h=41cf26ec1758fa0b1caa72d2994616f03aba556a;hb=bcde3d00165789db1e1ef183fab968c091faab8c;hp=431aa16c5aafc9ccba35873d970ffd6637b102f1;hpb=c476c3766cf74b3c95ca91f2fb0a0fd7f5df1110;p=lyx.git diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 431aa16c5a..41cf26ec17 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -347,7 +347,7 @@ docstring parbreak(CursorData const * cur) } -docstring CursorData::selectionAsString(bool with_label) const +docstring CursorData::selectionAsString(bool const with_label, bool const skipdelete) const { if (!selection()) return docstring(); @@ -355,8 +355,12 @@ docstring CursorData::selectionAsString(bool with_label) const if (inMathed()) return cap::grabSelection(*this); - int const label = with_label + int label = with_label ? AS_STR_LABEL | AS_STR_INSETS : AS_STR_INSETS; + if (skipdelete) + label = with_label + ? AS_STR_LABEL | AS_STR_INSETS | AS_STR_SKIPDELETE + : AS_STR_INSETS | AS_STR_SKIPDELETE; idx_type const startidx = selBegin().idx(); idx_type const endidx = selEnd().idx(); @@ -1835,13 +1839,13 @@ bool Cursor::inMacroMode() const InsetMathUnknown * Cursor::activeMacro() { - return inMacroMode() ? prevAtom().nucleus()->asUnknownInset() : 0; + return inMacroMode() ? prevAtom().nucleus()->asUnknownInset() : nullptr; } InsetMathUnknown const * Cursor::activeMacro() const { - return inMacroMode() ? prevAtom().nucleus()->asUnknownInset() : 0; + return inMacroMode() ? prevAtom().nucleus()->asUnknownInset() : nullptr; } @@ -2470,12 +2474,6 @@ void Cursor::checkBufferStructure() // In case the master has no gui associated with it, // the TocItem is not updated (part of bug 5699). buffer()->tocBackend().updateItem(*this); - - // If the last tracked change of the paragraph has just been - // deleted, then we need to recompute the buffer flag - // tracked_changes_present_. - if (inTexted() && paragraph().isChangeUpdateRequired()) - disp_.forceChangesUpdate(); }