Update buffer when an inset or an INFO inset has bee inserted

This is important for info inset, since if updateBuffer needs to be
run in redoParagraph (for the macro code), crashes can happen.

Fixes bug #10944.
This commit is contained in:
Jean-Marc Lasgouttes 2018-01-05 19:29:45 +01:00
parent 6253cc4c51
commit 806f40dbd4

View File

@ -1197,6 +1197,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
if (cur.selection())
cutSelection(cur, true, false);
cur.insert(inset);
cur.forceBufferUpdate();
if (inset->editable() && inset->asInsetText())
inset->edit(cur, true);
else
@ -1934,6 +1935,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
break;
cur.recordUndo();
insertInset(cur, inset);
cur.forceBufferUpdate();
cur.posForward();
break;
}