diff --git a/src/Text.cpp b/src/Text.cpp index 88341f6f97..bf77a0c251 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -86,8 +86,8 @@ namespace lyx { using support::bformat; using support::contains; -using support::rsplit; using support::split; +using support::subst; using cap::cutSelection; using cap::pasteParagraphList; @@ -1278,8 +1278,7 @@ docstring Text::getPossibleLabel(Cursor & cur) const docstring par_text = pars_[pit].asString(cur.buffer(), false); string piece; // the return string of math matrices might contain linebreaks - // FIXME: unicode - par_text = from_utf8(rsplit(to_utf8(par_text), piece, '\n')); + par_text = subst(par_text, '\n', '-'); for (int i = 0; i < lyxrc.label_init_length; ++i) { if (par_text.empty()) break;