commit 4824f7c9db8301550c1bc53c340fbeae916a46f3
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Mar 2 13:21:59 2014 +0100

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

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 60a0157..b124743 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -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:

Reply via email to