mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Fix bug #6678: Crash when undoing backspace inside math-macro
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34370 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b269eb9117
commit
cf1f59dd4d
@ -296,7 +296,8 @@ void Undo::Private::doRecordUndo(UndoKind kind,
|
||||
// fill in the real data to be saved
|
||||
if (cell.inMathed()) {
|
||||
// simply use the whole cell
|
||||
undo.array = new MathData(cell.cell());
|
||||
MathData & ar = cell.cell();
|
||||
undo.array = new MathData(ar.buffer(), ar.begin(), ar.end());
|
||||
} else {
|
||||
// some more effort needed here as 'the whole cell' of the
|
||||
// main Text _is_ the whole document.
|
||||
|
@ -401,7 +401,9 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc)
|
||||
if (!macroInset || macroInset->name_.empty()
|
||||
|| macroInset->name_[0] == '^'
|
||||
|| macroInset->name_[0] == '_'
|
||||
|| macroInset->name() == edited_name)
|
||||
|| (macroInset->name() == edited_name
|
||||
&& macroInset->displayMode() ==
|
||||
MathMacro::DISPLAY_UNFOLDED))
|
||||
continue;
|
||||
|
||||
// get macro
|
||||
|
Loading…
Reference in New Issue
Block a user