Fix crash after undo following replacement of a multicell selection (#8973).

This commit is contained in:
Juergen Spitzmueller 2014-03-02 13:21:59 +01:00
parent 6b35bb7544
commit 4824f7c9db

View File

@ -4328,8 +4328,16 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
if (cur.selIsMultiCell()) {
cur.recordUndoInset(DELETE_UNDO);
cutSelection(cur);
}
cell(cur.idx())->dispatch(cur, cmd);
BufferView * bv = &cur.bv();
docstring::const_iterator cit = cmd.argument().begin();
docstring::const_iterator const end = cmd.argument().end();
for (; cit != end; ++cit)
bv->translateAndInsert(*cit, getText(cur.idx()), cur);
cur.resetAnchor();
bv->bookmarkEditPosition();
} else
cell(cur.idx())->dispatch(cur, cmd);
break;
case LFUN_CHAR_DELETE_BACKWARD: