// Try and generate a valid index entry.
InsetCommandParams icp("index");
string const contents = cmd.argument.empty() ?
- bv->getLyXText()->getStringToIndex(bv) :
+ bv->getLyXText()->getStringToIndex() :
cmd.argument;
icp.setContents(contents);
return new InsetTheorem;
#endif
- case LFUN_INSET_APPLY: {
+ case LFUN_INSET_INSERT: {
string const name = cmd.getArg(0);
if (name == "bibitem") {
return inset;
} else if (name == "external") {
- InsetExternal::Params iep;
+ InsetExternal::Params iep;
InsetExternalMailer::string2params(cmd.argument, iep);
InsetExternal * inset = new InsetExternal;
inset->setFromParams(iep);
return inset;
} else if (name == "graphics") {
- InsetGraphicsParams igp;
+ InsetGraphicsParams igp;
InsetGraphicsMailer::string2params(cmd.argument, igp);
InsetGraphics * inset = new InsetGraphics;
string const fpath = cmd.view()->buffer()->filePath();
} else if (tmptok == "Include") {
InsetCommandParams p("Include");
inset = new InsetInclude(p, buf);
+ } else if (tmptok == "Environment") {
+ lex.next();
+ inset = new InsetEnvironment(buf.params, lex.getString());
} else if (tmptok == "ERT") {
inset = new InsetERT(buf.params);
} else if (tmptok == "Tabular") {