* src/Text.cpp:

- safer (but slightly less nice) fix for bug 4334. Fixes bug 4347 that was introduced in r21488.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@21540 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-11-10 10:48:13 +00:00
parent 9517942f77
commit 77c1dbe3ba

View File

@ -90,7 +90,7 @@ using support::bformat;
using support::contains;
using support::lowercase;
using support::split;
using support::rsplit;
using support::subst;
using support::uppercase;
using cap::cutSelection;
@ -1899,8 +1899,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;