diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index b577b65a76..6b3a93f308 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -1349,6 +1349,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd) case LFUN_COMMAND_SEQUENCE: { // argument contains ';'-terminated commands string arg = argument; + if (theBufferList().isLoaded(buffer)) + buffer->undo().beginUndoGroup(); while (!arg.empty()) { string first; arg = split(arg, first, ';'); @@ -1356,6 +1358,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd) func.origin = cmd.origin; dispatch(func); } + if (theBufferList().isLoaded(buffer)) + buffer->undo().endUndoGroup(); break; }