From 1fefbf5bdcb9b7c9f163280ed8eeaff2b1271bd5 Mon Sep 17 00:00:00 2001 From: Jean-Marc Date: Sun, 20 Jul 2014 00:50:24 +0200 Subject: [PATCH] Fix bad use of undo kind in Tabular inset. --- src/insets/InsetTabular.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index f7f0d2419b..8a8c2129f6 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -4303,7 +4303,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) FileName(to_utf8(cmd.argument()))); if (tmpstr.empty()) break; - cur.recordUndoInset(INSERT_UNDO); + cur.recordUndoInset(); if (insertPlaintextString(cur.bv(), tmpstr, false)) { // content has been replaced, // so cursor might be invalid @@ -4318,7 +4318,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_CUT: if (cur.selIsMultiCell()) { if (copySelection(cur)) { - cur.recordUndoInset(DELETE_UNDO); + cur.recordUndoInset(); cutSelection(cur); } } else @@ -4327,7 +4327,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_SELF_INSERT: if (cur.selIsMultiCell()) { - cur.recordUndoInset(DELETE_UNDO); + cur.recordUndoInset(); cutSelection(cur); BufferView * bv = &cur.bv(); docstring::const_iterator cit = cmd.argument().begin(); @@ -4344,7 +4344,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_CHAR_DELETE_BACKWARD: case LFUN_CHAR_DELETE_FORWARD: if (cur.selIsMultiCell()) { - cur.recordUndoInset(DELETE_UNDO); + cur.recordUndoInset(); cutSelection(cur); } else cell(cur.idx())->dispatch(cur, cmd); @@ -4370,7 +4370,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) // pass to InsertPlaintextString, but // only if we have multi-cell content if (clip.find_first_of(from_ascii("\t\n")) != docstring::npos) { - cur.recordUndoInset(INSERT_UNDO); + cur.recordUndoInset(); if (insertPlaintextString(cur.bv(), clip, false)) { // content has been replaced, // so cursor might be invalid @@ -4392,7 +4392,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) break; } if (theClipboard().isInternal()) { - cur.recordUndoInset(INSERT_UNDO); + cur.recordUndoInset(); pasteClipboard(cur); } break;