* src/Text.cpp (getPossibleLabel):

- remove line breaks from label proposals (fixes bug 4334)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21489 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-11-07 15:30:08 +00:00
parent a88884aaa2
commit cd4c58fb92

View File

@ -85,6 +85,7 @@ namespace lyx {
using support::bformat;
using support::contains;
using support::rsplit;
using support::split;
using cap::cutSelection;
@ -1274,6 +1275,10 @@ docstring Text::getPossibleLabel(Cursor & cur) const
docstring text;
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'));
for (int i = 0; i < lyxrc.label_init_length; ++i) {
if (par_text.empty())
break;