- InsetCommandParams p;
- InsetCommandMailer::string2params("label", cmd.argument, p);
- if (p.getCmdName().empty())
- return DispatchResult(false);
- bool clean = true;
- if (p.getContents() != params().getContents())
- clean = cur.bv().ChangeRefsIfUnique(params().getContents(),
- p.getContents());
+ InsetCommandParams p("label");
+ // FIXME UNICODE
+ InsetCommandMailer::string2params("label", to_utf8(cmd.argument()), p);
+ if (p.getCmdName().empty()) {
+ cur.noUpdate();
+ break;
+ }
+ if (p["name"] != params()["name"])
+ cur.bv().buffer()->changeRefsIfUnique(params()["name"],
+ p["name"], InsetBase::REF_CODE);