tdf#157130 undo and track changes not restoring characters (macOS)

Not sure about the real underlying issue here.

In debug mode, we hit this assert. Changing it from an assert to a "do decrement mnEmptyMark if it would become negative" seems to help.

Change-Id: Ie23a685552d2f8153b67e18f9c0203ecbaad0ede
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174905
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2024-10-14 17:07:31 +02:00
parent caf1bc0c4c
commit 148fa9e940

View file

@ -583,13 +583,9 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( std::unique_ptr<SfxUndoAction>
if (m_xData->pActUndoArray->nCurUndoAction > 0)
{
--m_xData->pActUndoArray->nCurUndoAction;
// fdo#66071 invalidate the current empty mark when removing
--m_xData->mnEmptyMark;
}
else
{
assert(!"CurrentUndoAction going negative (!)");
}
// fdo#66071 invalidate the current empty mark when removing
--m_xData->mnEmptyMark;
}
}